我已经在EMR上创建了一个外部表,以通过Hive在DynamoDB上搜索数据。
由于DDB表中有一个map字段,因此我将该字段映射为map,这导致以JSON格式显示所有记录。
我的想法是使用Hive(或其他工具,我愿意接受任何建议)从此JSON中提取地图字段
尝试:
- Export the table without column mapping, but json serde did not work.
- Export records to S3 in order to read them through Athena, without success.
DDB JSON
{
"Status": "{\"s\":\"CREATED\"}",
"AccountId": "{\"s\":\"fd26cd3a-5575-4dc2-84ae-8aae536810c4\"}",
"UserName": "{\"s\":\"username\"}",
"Email": "{\"s\":\"email@gmail.com\"}",
"UpdatedDate": "{\"s\":\"2018-02-13T20:25:13.940Z\"}",
"DocumentId": "{\"s\":\"1234567\"}",
"CreatedDate": "{\"s\":\"2018-02-13T20:25:13.940Z\"}",
"Metadata": "{\"m\":{}}",
"PhoneNumber": "{\"s\":\"+1122334455\"}",
"UserExternalKey": "{\"s\":\"197b7aa7-a4cd-4641-9604-6dfc80bd34a3\"}"
}
能否请您指导我如何解码该字段?