Skip to content

bigquery: support for JSON type #10539

@rebeccajan

Description

@rebeccajan

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

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the BigQuery API.priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions