-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
There is currently no public method to resubmit an existing job for instance when a transient error
like 403 rateLimitExceeded is returned.
As a workaround, we currently use the following, which works for query and load :
bq = bigquery.Client()
job_ref = bq.get_job('jobid_that_failed_because_of_ratelimit')._build_resource()
job_ref['jobReference']['jobId'] = str(uuid4())
# clear properties set by job response
if 'query' in job_ref['configuration']:
del (job_ref['configuration']['query']['destinationTable'])
new_job = bq.job_from_resource(job_ref)
new_job._begin()
Request is to have a method that works for any job type and is included in core package - as above private methods may change
koesper
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.