-
Notifications
You must be signed in to change notification settings - Fork 514
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
BigQuery load fails with JSON array #5542
Comments
Indeed, I overlooked the fact that a Json root can either be
|
Looking after it, now I remember why I came up with Beam is using a unmaintained BigQuery client. I could not find anything in it dealing with JSON fields, so I supposed it to be directly stored as a simple JSON element in its representation tree. Also BigQuery doc states:
Beam does not seem to really care about it. Thing is, google-api-services-bigquery relies on google-http-client I don't know what was the issue with it, but maybe a Gson |
After long time digging around the Json type support in
row.set("column", Json.parse(row.getJson("column")) WDYT of that @turb ? |
Do you mean #5544 is a dead-end? (edit: fixed the number) Avro can do, I suppose it would be transparent for the user, except for the JSON column case? For JSON, the user should have a hint on how to do that (where to access |
avro handles JSON well too. it will be an |
So if it would use avro, that handles it well, why is this necessary? (I'm not sure I understand what you're saying) |
Sorry I wasn't clear: This snipet is only relevant when using the |
OK, then if using avro under the hood solves it, I've nothing against it :) I'll try a load with JSON against #5529. |
Worked like a charm! |
When loading data to BigQuery with a JSON column, it fails when the actual data is a Json array
[ data1, data2 ]
:It did work with
JacksonNode
, but I wonder if it is possible withTableRow
.The text was updated successfully, but these errors were encountered: