Skip to content

Improve the BigQuery streaming insert failure message #11285

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

Closed
parthea opened this issue Oct 11, 2015 · 0 comments · Fixed by #11286
Closed

Improve the BigQuery streaming insert failure message #11285

parthea opened this issue Oct 11, 2015 · 0 comments · Fixed by #11286
Labels
Error Reporting Incorrect or improved errors from pandas
Milestone

Comments

@parthea
Copy link
Contributor

parthea commented Oct 11, 2015

The error message shown when a BigQuery streaming insert fails could be improved by adding the location field.

Code to reproduce:

from datetime import datetime
from pandas import DataFrame
from pandas.io import gbq
import pytz

test_timestamp = datetime.now(pytz.timezone('US/Arizona'))
bad_df = DataFrame({'bools': [False, False], 'flts': [0.0, 1.0], 'ints': [0, '1'], 'strs': ['a', 1],
                    'times': [test_timestamp, test_timestamp]}, index=range(2))
gbq.to_gbq(bad_df, destination_table, project_id, verbose=True,if_exists='replace')

Output:

Streaming Insert is 100% Complete
Error at Row: 0, Reason: invalid, Message: Could not convert value to string
Error at Row: 1, Reason: invalid, Message: Could not convert value to string

Proposed output:

Streaming Insert is 100% Complete
Error at Row: 0, Reason: invalid, Location: Field:ints, Message: Could not convert value to string
Error at Row: 1, Reason: invalid, Location: Field:strs, Message: Could not convert value to string
@parthea parthea changed the title Improve the error message when BigQuery streaming inserts fail Improve the BigQuery streaming insert failure message Oct 11, 2015
@jreback jreback added Error Reporting Incorrect or improved errors from pandas Google I/O labels Oct 11, 2015
@jreback jreback added this to the Next Major Release milestone Oct 11, 2015
@jreback jreback modified the milestones: 0.17.1, Next Major Release Oct 11, 2015
jreback added a commit that referenced this issue Oct 11, 2015
ENH: Improvement to the BigQuery streaming insert failure message #11285
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error Reporting Incorrect or improved errors from pandas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants