Skip to content

Commit b2a547e

Browse files
committed
Merge pull request #11286 from parthea/improve-bq-streaming-insert-error
ENH: Improvement to the BigQuery streaming insert failure message #11285
2 parents 76d4c49 + f02374b commit b2a547e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

doc/source/whatsnew/v0.17.1.txt

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Enhancements
2020

2121
.. _whatsnew_0171.enhancements.other:
2222

23+
- Improve the error message in :func:`pandas.io.gbq.to_gbq` when a streaming insert fails (:issue:`11285`)
24+
2325
Other Enhancements
2426
^^^^^^^^^^^^^^^^^^
2527

pandas/io/gbq.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ def process_insert_errors(insert_errors, verbose):
185185
for error in errors:
186186
reason = error['reason']
187187
message = error['message']
188-
error_message = 'Error at Row: {0}, Reason: {1}, Message: {2}'.format(row, reason, message)
188+
location = error['location']
189+
error_message = 'Error at Row: {0}, Reason: {1}, Location: {2}, Message: {3}'.format(row, reason, location, message)
189190

190191
# Report all error messages if verbose is set
191192
if verbose:

0 commit comments

Comments
 (0)