-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add 'Table.upload_from_file'. #1318
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
Add 'Table.upload_from_file'. #1318
Conversation
Handles both single-request (multipart) and resumable uploads. Closes #1261
@@ -102,20 +102,18 @@ def dataset(self, dataset_name): | |||
""" | |||
return Dataset(dataset_name, client=self) | |||
|
|||
def _job_from_resource(self, resource): | |||
def job_from_resource(self, resource): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -693,6 +699,225 @@ def insert_data(self, | |||
|
|||
return errors | |||
|
|||
@staticmethod | |||
def _configure_job_metadata(metadata, # pylint: disable=R0913 |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Addresses: #1318 (comment).
return client.job_from_resource(json.loads(response_content)) | ||
|
||
|
||
def _configure_job_metadata(metadata, # pylint: disable=R0913 |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
quote_character, | ||
skip_leading_rows, | ||
write_disposition): | ||
"""Helper for :meth:`Table.upload_from_file`.""" |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@tseaver LGTM to merge so we can get changes into |
Follow up issue: #1431 |
…_resumable Add 'Table.upload_from_file'.
@tseaver FYI |
Handles both single-request (multipart) and resumable uploads.
Closes #1261