【发布时间】:2020-03-27 10:49:20
【问题描述】:
我的数据存在于以下 JSON 结构中
{"person": "John", "children": [{"name":"Tim", "age":9},{"name":"Suszan", "age":12},{"name":"Karl", "age":14}]}
在 Big Query 中,它具有 schmea
children RECORD REPEATED
children. age INTEGER NULLABLE
children. name STRING NULLABLE
person STRING NULLABLE
当我们查看实际的表格时,我们有这个
但我真的很想拥有以下格式的数据
我被卡住了,因为我知道我可以使用unnest(children) as children 来访问记录,但它会创建一个新行,但我不能使用ARRAY_TO_STRING(children.name),因为它不是纯粹的数组。我有点夹在两者之间。
谢谢。
【问题讨论】:
标签: sql google-bigquery