2
によって1線に現れる1(サブ)JSONオブジェクトを作成し、受け入れられたJSON形式は次のとおりです。すべての反復/ネストされたフィールドを含むクラウドBigQueryのではJQ
一つJSONオブジェクト、各ライン上に表示される必要があります。
{ "1": { "kind": "person", "fullName": "John Doe", "age": 22, "gender": "Male", "citiesLived": [ { "place": "Seattle", "numberOfYears": 5 }, { "place": "Stockholm", "numberOfYears": 6 } ] }, "2": { "kind": "person", "fullName": "Jane Austen", "age": 24, "gender": "Female", "citiesLived": [ { "place": "Los Angeles", "numberOfYears": 2 }, { "place": "Tokyo", "numberOfYears": 2 } ] } }
jq
によって以下に変換する方法:JSONを与え、今https://cloud.google.com/bigquery/data-formats#json_format
:
はを参照してください?
{"kind": "person", "fullName": "John Doe", "age": 22, "gender": "Male", "citiesLived": [{ "place": "Seattle", "numberOfYears": 5}, {"place": "Stockholm", "numberOfYears": 6}]}
{"kind": "person", "fullName": "Jane Austen", "age": 24, "gender": "Female", "citiesLived": [{"place": "Los Angeles", "numberOfYears": 2}, {"place": "Tokyo", "numberOfYears": 2}]}