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

Docs lack guidance about choosing job_name parameter #3826

Closed
inglesp opened this issue Aug 16, 2017 · 4 comments
Closed

Docs lack guidance about choosing job_name parameter #3826

inglesp opened this issue Aug 16, 2017 · 4 comments
Assignees
Labels
api: bigquery Issues related to the BigQuery API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@inglesp
Copy link

inglesp commented Aug 16, 2017

Many methods on google.cloud.bigquery.client.Client take a job_name as their parameter but there's no guidance in the docs about what the job_name should be.

Investigation suggests it needs to be unique, and this is confirmed under the "Generating a job ID" section of this page (which I found through Googling). That page also suggests using eg Python's uuid.uuid4().

Could some advice about choosing job_name be added to https://googlecloudplatform.github.io/google-cloud-python/latest/bigquery/client.html?

And better, although it'd be a backwards-incompatible change, could job_name be an optional parameter that's generated automatically by BQ?

@lukesneeringer
Copy link
Contributor

Hi @inglesp,
So, having BigQuery itself generate a job_name is actually a little bit of an anti-pattern, because that has an undesirable effect on retries. So, we want the client library to do it. However, we do have a plan to make it such that you to not have to specify the job_name, and the client library will do it for you (using uuid.uuid4()), which mitigates this.

@lukesneeringer
Copy link
Contributor

Hmm, I thought we had an issue open for this, but I do not see one (I might have closed it by accident last week), so leaving this one open. :-)

@lukesneeringer lukesneeringer added api: bigquery Issues related to the BigQuery API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Aug 16, 2017
@tswast
Copy link
Contributor

tswast commented Aug 24, 2017

Duplicate of #3209.

@lukesneeringer
Copy link
Contributor

Okay, we did have one. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the BigQuery API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

3 participants