Skip to content

ENH: Improvement to the BigQuery streaming insert failure message #11285 #11286

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/source/whatsnew/v0.17.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Enhancements

.. _whatsnew_0171.enhancements.other:

- Improve the error message in :func:`pandas.io.gbq.to_gbq` when a streaming insert fails (:issue:`11285`)

Other Enhancements
^^^^^^^^^^^^^^^^^^

Expand Down
3 changes: 2 additions & 1 deletion pandas/io/gbq.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ def process_insert_errors(insert_errors, verbose):
for error in errors:
reason = error['reason']
message = error['message']
error_message = 'Error at Row: {0}, Reason: {1}, Message: {2}'.format(row, reason, message)
location = error['location']
error_message = 'Error at Row: {0}, Reason: {1}, Location: {2}, Message: {3}'.format(row, reason, location, message)

# Report all error messages if verbose is set
if verbose:
Expand Down