【发布时间】:2017-01-03 08:00:08
【问题描述】:
我正在尝试将 json 文件加载到 BQ 表中。我的架构看起来像:
{"_eventid": "1234", "Keywords":""}
{"_eventid": "4567", "Keywords":{"_text":"abcd"} }
从上面,您可以看到“关键字”的架构发生了变化。我该如何处理?使用类似的东西:
{
"name":"Keywords",
"type":"record",
"mode":"nullable",
"fields": [
{
"name":"_text",
"type":"string",
"mode":"nullable"
}
]
},
仅适用于第二个条目。首先,我得到了错误:
Errors:
file-00000000: JSON table encountered too many errors, giving up. Rows: 1; errors: 1. (error code: invalid)
JSON parsing error in row starting at position 0 at file: file- 00000000. Flat value specified for record field. Field: Keywords; Value: (error code: invalid)
【问题讨论】:
标签: json google-bigquery