Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yt export improvements #377

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ydb/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def __init__(self):
self.host = None
self.port = None
self.uid = None
self.use_type_v3 = False

def with_port(self, port):
self.port = port
Expand Down Expand Up @@ -118,6 +119,10 @@ def with_items(self, *items):
self.items.extend(items)
return self

def with_use_type_v3(self, use_type_v3):
self.use_type_v3 = use_type_v3
return self


class ExportToS3Settings(s_impl.BaseRequestSettings):
def __init__(self):
Expand Down Expand Up @@ -192,6 +197,9 @@ def _export_to_yt_request_factory(settings):
if settings.port:
request.settings.port = settings.port

if settings.use_type_v3:
request.settings.use_type_v3 = settings.use_type_v3

for source_path, destination_path in settings.items:
request.settings.items.add(source_path=source_path, destination_path=destination_path)

Expand Down
Loading