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

Improve the BigQuery streaming insert failure message #11285

Closed
parthea opened this Issue Oct 11, 2015 · 0 comments

Comments

Projects
None yet
2 participants
@parthea
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 from Improve the error message when BigQuery streaming inserts fail to Improve the BigQuery streaming insert failure message 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

Merge pull request #11286 from parthea/improve-bq-streaming-insert-error
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