I am trying to create a table from JSON files in BigQuery and want just one column which will represent the first key 'id'
only.
Creating a schema with only one column causes errors because all of the JSON keys in the input files are considered.
Is there a way to create a table that corresponds to only specific JSON keys?
Unfortunately, you can't create a table from a JSON
file in BigQuery
with just one column from the JSON
file. You can create a feature request in this link .
You have these options:
Option 1
JSON
, but as CSV instead (define null character as separator)JSON
stringBigQuery
with maximum flexibility (JSON parsing functions and even JS)Option 2
Do a 2-step import:
SELECT column1 FROM [newtable]
" into the existing table.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.