-
Notifications
You must be signed in to change notification settings - Fork 309
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
deps: use pandas-gbq to determine schema in load_table_from_dataframe
#2095
base: main
Are you sure you want to change the base?
Conversation
|
…176126-pandas-gbq
I've tested locally with googleapis/python-bigquery-pandas#844 and that PR should fix the remaining system test.
|
load_table_from_dataframe
load_table_from_dataframe
Looks like a real failure (the warning message changed slightly in pandas-gbq). I'll try to update the test to be a bit more robust. |
@Linchin @chalmerlowe I believe this is finally ready for review. The failing checks are for infrastructure / Kokoro problems for a new setup, possibly? |
@@ -1259,7 +1259,7 @@ def test_upload_time_and_datetime_56(bigquery_client, dataset_id): | |||
df = pandas.DataFrame( | |||
dict( | |||
dt=[ | |||
datetime.datetime(2020, 1, 8, 8, 0, 0), | |||
datetime.datetime(2020, 1, 8, 8, 0, 0, tzinfo=datetime.timezone.utc), |
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.
Not sure is we should have defined what happens when you mix and match naive datetime (DATETIME in BQ) with datetime + timezone (TIMESTAMP in BQ). Since the test expects TIMESTAMP, I update this to be a datetime + timezone.
We still mix/match timezones, so I think that part is important to make sure we end up returning UTC values.
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.
By and large, this looks good.
I have a question that might be a potential blocker.
Co-authored-by: Chalmer Lowe <[email protected]>
@@ -74,6 +74,9 @@ bqstorage = [ | |||
] | |||
pandas = [ | |||
"pandas >= 1.1.0", | |||
"pandas-gbq >= 0.26.1; python_version >= '3.8'", |
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.
Note: this means we are testing without pandas-gbq on Python 3.7.
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:
Towards go/pandas-gbq-and-bigframes-redundancy
🦕