我正在使用Firehose和Glue提取数据并将JSON转换为S3中的镶木地板文件。
我成功使用普通的JSON(非嵌套或数组)实现了它。但是我无法使用嵌套的JSON数组。我所做的:
JSON结构
{
"class_id": "test0001","students": [{
"student_id": "xxxx","student_name": "AAAABBBCCC","student_gpa": 123
}]
}
Glue模式
- 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_gpa:INT>>' but 'ARRAY' is found.
任何建议都值得赞赏。