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

refactor(bigquery): update code sample of quey job #104

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

HemangChothani
Copy link
Collaborator

Towards [8989]

List of changes

  1. get_job
  2. cancel_job
  3. client_query_total_rows
  4. query_external_gcs_permanent_table

Copy link
Collaborator

@IlyaFaer IlyaFaer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple nits. Tim can ask to delete excess variables,. So I would got rid of them

:start-after: [START bigquery_get_job]
:end-before: [END bigquery_get_job]

CancelJob
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like whitespace lost in here

"""
location = "us"
job = client.query(sql, location=location)
job_id = job.job_id
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable looks excess. It used only once, and it won't be changed within cancel_job() method

"""
location = "us"
job = client.query(sql, location=location)
job_id = job.job_id
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excess as well

Copy link
Collaborator

@mf2199 mf2199 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some really minor things but otherwise OK.

"""
location = "us"
job = client.query(sql, location=location)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A nit: Even though it's probably copied from the original, I'm not sure if this blank line makes much sense.

Comment on lines 31 to 34

job = client.get_job(job.job_id, location=location) # Make an API request.
print("Details for job {} running in {}:".format(job.job_id, location))

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants