-
Notifications
You must be signed in to change notification settings - Fork 1.5k
bigquery: support for JSON type #10539
Copy link
Copy link
Closed
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Is your feature request related to a problem? Please describe.
It would be possible to convert a bigquery.Schema to a storagepb.TableSchema using the adapt package functionality if the storagepb library supported JSON data types.
Given a bigquery.schema with a field Payload and a data type JSON, the below code:
schema, err := adapt.BQSchemaToStorageTableSchema(schema)Throws the error:
"could not convert field (Payload) due to unknown type value: JSON"Describe the solution you'd like
Support for the JSON data type in the bigquery client libraries i.e. storagepb.TableSchema, this functionality exists for Java and Node libraries.
Describe alternatives you've considered
Using a STRING field which takes a stringified JSON instead of an actual JSON - but this is not ideal.
Additional context
Add any other context or screenshots about the feature request here.
N/A