通过Firehose将地图数据放到雅典娜

时间:2019-07-09 10:52:18

标签: boto3 amazon-athena amazon-kinesis-firehose

我在雅典娜有一列地图类型。我已经在Glue中将模式定义为Map。

我定义了一个firehose流,该流引用胶水架构并将其转换为实木复合地板格式。但是,发送数据时出现以下错误

The schema is invalid. Error parsing the schema: Error: type expected at the position 0 of 'MAP <STRING, INT>' but 'MAP ' is found.

我正在使用boto3 firehose客户端提交数据。

这是我尝试过的

records=[{'Data': '{"id": "aac4da11-d166-42bd-83db-c670f5b5676d", "createdutc": "2019-06-27 10:25:33","tokens": {"black": 1, "spot": 1, "joint": 1, "leg": 1, "due": 1, "itchinghow": 1, "reduce": 1}'}]

firehoseClient.put_record_batch(
    DeliveryStreamName='conversations-analysis',
    Records=records)

1 个答案:

答案 0 :(得分:0)

显然,我能够解决它,以小写字母提及您架构中的所有内容,您应该能够保存地图数据。例如,以地图代替MAP