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

BigQuery: [magics] if destination_var is set and an error occurs, save the QueryJob for further inspection #9091

Closed
tswast opened this issue Aug 23, 2019 · 0 comments · Fixed by #9245
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

@tswast
Copy link
Contributor

tswast commented Aug 23, 2019

Is your feature request related to a problem? Please describe.

When an error occurs, it's useful to have a QueryJob object to inspect the errors properties, as well as check for other details about the job that may have caused the failure. At the very least, a job ID is needed if one wants to file a support ticket about the failure.

Describe the solution you'd like

As identified in #9067 (review), when an error occurs with a %%bigquery magic, it would be useful to save the query job object for further inspection of the error and the rest of the job.

A problem with this is that in successful cases destination_var will be a pandas DataFrame, but in failure cases destination_var will be a QueryJob object. Since the magics are primarily used interactively, this probably isn't that much of a problem.

Describe alternatives you've considered

Print out the job ID and have the user call client.get_job() in order to inspect the object. This does not work in the case of dry run queries, as no job resource is saved in the backend.

@tswast tswast added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. api: bigquery Issues related to the BigQuery API. labels Aug 23, 2019
@plamut plamut self-assigned this Sep 17, 2019
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

Successfully merging a pull request may close this issue.

2 participants