BigQuery Job ID Generation #618
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change introduces client-generated Job IDs. It also adds support for user-specified job prefixes.
The goal of this feature is to make inserting jobs idempotent. I am concerned that I may not have quite captured that in this pull request. Job IDs are generated when
BigQueryClient::runQueryAsJob()or the various Job-creating methods onTableare called. This means that multiple calls to those methods will result in different unique Job IDs, even if the configuration is identical.Those IDs are accessible after the call is executed, by invokingJob::id(). Currently there is not a means for a user to manually specify a Job ID (only a prefix); this means that one cannot retry with an existing Job ID.If this is an issue, it could be mitigated without major changes to the client by adding an optional
$jobIdargument to the various job-creating methods'$options, along with documentation advising against using it except in well-defined circumstances.