-
Notifications
You must be signed in to change notification settings - Fork 125
to_gbq() failed to stream record type to BigQuery #159
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
Comments
Thanks for the report Representing nested data structures is not pandantic, and this isn't currently supported in writing to GBQ. One solution is to load them flattened to BQ and then run a BQ query to nest them We can leave this open for tracking |
Thanks @maxim-lian. Running a BQ query might be a workaround for adhoc jobs. But I think I am going to serialize the data in JSON, load it to Google Cloud Storage and then copy over to BQ with the right schema. |
@LiChangNY yes that's a great solution |
hi any chance record fields are supported in pandas_gbq now? |
@hilahersz — pandas really isn't the best tool for nested data structures. I'm less involved in this library these days, but I don't think it's implemented yet. |
Closing this out as a "Won't Fix". |
Looks like there's some issue when streaming RECORD type data to BigQuery. Here're two examples how you can reproduce this issue. Any help is appreciated!
Without specifying
table_schema
arg, no errors but loads column b as STRING type.Adding
table_schema
would return a 400 error as it treats the RECORD type column as strings.returns
Package:
The text was updated successfully, but these errors were encountered: