Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to load nested data to Google BigQuery using CSV format?

I found the way to load nested data to BigQuery here but it is in JSON format. How to load the nested data in CSV format? https://developers.google.com/bigquery/docs/data#nested

On the other hand, once the schema for the nested data is defined, anyway we can change the schema?

like image 775
Ngoc Tran Avatar asked Sep 17 '26 11:09

Ngoc Tran


1 Answers

The data in CSV needs to be encoded in some way to represent nested structure. For example, it may contain JSON fragments. Then you can load this data into flat table first, and then perform ETL transformations on it using BigQuery's SQL functions. For example for manipulations over strings containing JSON you can use https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#json-functions

like image 89
Mosha Pasumansky Avatar answered Sep 22 '26 04:09

Mosha Pasumansky