-
Notifications
You must be signed in to change notification settings - Fork 121
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
fix!: to_gbq
loads unit8
columns to BigQuery INT64 instead of STRING
#814
fix!: to_gbq
loads unit8
columns to BigQuery INT64 instead of STRING
#814
Conversation
fix!: `to_gbq` loads naive (no timezone) columns to BigQuery DATETIME instead of TIMESTAMP fix!: `to_gbq` loads object column containing bool values to BOOLEAN instead of STRING fix!: `to_gbq` loads object column containing dictionary values to STRUCT instead of STRING
Looks like I need to update the tests to be compatible with older pandas. |
…_gbq' into b323176126-issue300-streaming-to_gbq
@Linchin @chelsea-lin please take a look. I got it working on Python 3.8 by upgrading the minimum pyarrow version from 3.0.0 (January 2021) to 4.0.0 (April 2021). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -0,0 +1,156 @@ | |||
# Copyright (c) 2019 pandas-gbq Authors All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This contains some code I copied from a file dated to 2019, so I don't think I should update this.
@@ -1219,9 +1220,16 @@ def _generate_bq_schema(df, default_type="STRING"): | |||
be overridden: https://github.com/pydata/pandas-gbq/issues/218, this | |||
method can be removed after there is time to migrate away from this | |||
method.""" | |||
from pandas_gbq import schema | |||
fields = pandas_gbq.schema.pandas_to_bigquery.dataframe_to_bigquery_fields( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe should have un-deprecated generate_bq_schema
for use in bigframes.
fix!:
to_gbq
loadsunit8
columns to BigQuery INT64 instead of STRING (#814)fix!:
to_gbq
loads naive (no timezone) columns to BigQuery DATETIME instead of TIMESTAMP (#814)fix!:
to_gbq
loads object column containing bool values to BOOLEAN instead of STRING (#814)fix!:
to_gbq
loads object column containing dictionary values to STRUCT instead of STRING (#814)deps: min pyarrow is now 4.0.0 to support compliant nested types (#814)
Release-As: 0.24.0
Note to Googlers, this copies some pandas -> BigQuery logic from both https://github.com/googleapis/python-bigquery and https://github.com/googleapis/python-bigquery-dataframes as part of an effort to reduce redundancy across code bases. My intention is to make those packages depend on pandas-gbq for pandas -> BigQuery logic.
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #452, #105, #616, #450
🦕