【发布时间】:2020-03-05 05:09:32
【问题描述】:
我正在使用 Firehose 和 Glue 来摄取数据并将 JSON 转换为 S3 中的 parquet 文件。
我成功地使用普通 JSON(不是嵌套或数组)实现了它。但是我对嵌套的 JSON 数组失败了。我做了什么:
JSON 结构
{
"class_id": "test0001",
"students": [{
"student_id": "xxxx",
"student_name": "AAAABBBCCC",
"student_gpa": 123
}]
}
胶水模式
- class_id:字符串
- 学生:数组
ARRAY<STRUCT<student_id:STRING,student_name:STRING,student_gpa:INT>>
我收到错误:
The schema is invalid. Error parsing the schema: Error: type expected at the position 0 of 'ARRAY<STRUCT<student_id:STRING,student_name:STRING,student_gpa:INT>>' but 'ARRAY' is found.
欢迎提出任何建议。
【问题讨论】:
-
为 JSON 编写自定义分类器。详情请查看docs.aws.amazon.com/glue/latest/dg/…
-
任何解决方案@franco phong ?
标签: json amazon-web-services parquet aws-glue amazon-kinesis-firehose