【发布时间】:2017-08-14 07:09:56
【问题描述】:
我正在尝试使用复制命令将其中一列中具有多个值的 JSON 文件加载到 Redshift,但出现错误:
无效的 JSONPath 格式:成员不是对象。
这就是我的 JSON 文件的样子:
{"id":3,
"name":"John",
"children":[
{"child":"Ann","age":10},
{"child":"Dan","age":4},
{"child":"Ben","age":3}]
}
这是我的 jsonpath 文件:
{
"jsonpaths": [
"$.id",
"$.name",
"$.children.child",
"$.children.age"
]
}
我希望 SQL 中的数据能够显示:
id name child age
-- ---- ----- ---
3 John Ann 10
3 John Dan 4
3 John Ben 3
有什么想法吗?
【问题讨论】:
标签: json amazon-web-services amazon-s3 copy amazon-redshift