You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BigQuery: [magics] if destination_var is set and an error occurs, save the QueryJob for further inspection #9091
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.
Activity