Skip to content

BigQuery: no public method to retry/resubmit an existing job #5555

@yan-hic

Description

@yan-hic

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

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the BigQuery API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions