-
Notifications
You must be signed in to change notification settings - Fork 323
Closed
Labels
api: bigqueryIssues related to the googleapis/python-bigquery API.Issues related to the googleapis/python-bigquery API.externalThis issue is blocked on a bug with the actual product.This issue is blocked on a bug with the actual product.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not b
8D90
e included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Environment details
I'm using pandas with google-cloud-python
Steps to reproduce
- I have a dataframe has datetime format, ex: "2019-07-08 08:00:00" and my schema has created column with DATETIME type.
- I tried covert it to use pq.to_datetime()
- Then I used load_table_from_dataframe() to insert data.
Code example
my_df = get_sessions() # this return a dataframe has a column name is created which is datetime[ns] type ex :"2020-01-08 08:00:00"
my_df['created'] = pd.to_datetime(my_df['created'], format='%Y-%m-%d %H:%M:%S').astype('datetime64[ns]')
res = bigquery_client.client.load_table_from_dataframe(my_df, table_id)
res.result()
# exp: my value "2020-01-08 08:00:00" is being changed as INVALID or this value "0013-03-01T03:05:00" or other wrong value @plamut please help
I just updated my problem . Here
Thanks!
kolaworld, viniciuspassos, murilo-cunha and JoseArgueta
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the googleapis/python-bigquery API.Issues related to the googleapis/python-bigquery API.externalThis issue is blocked on a bug with the actual product.This issue is blocked on a bug with the actual product.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.