boto3 - 通过 Firehose 将地图数据放到 Athena
问题描述
我在 Athena 中有一个 Map 类型的列。我已将 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)
解决方案
显然,我能够解决它,用小写字母提及架构中的所有内容,您应该能够保存地图数据。例如地图而不是地图
推荐阅读
- javascript - 当值应该是Javascript中的列表时如何在地图中设置/添加键值对
- javascript - Angular 8 viewChild 返回未定义
- jquery - jQuery:将图块排序到两列。存储在 localStorage 中的默认顺序
- python - 在错误处理线上使用 pytube 获取 NameError
- mongodb - MongoDB 在 $group $push 中创建数组数组而不是平面数组
- rest - 使用 PATCH 或 POST 什么?
- c# - 如何使用另一台服务器作为代理(C#)从无法访问互联网的服务器发出 Web GET 请求
- ruby - 在读取文件中的“+”号后,我将如何制作一个仅打印到文件中的行的程序
- wordpress - 使用 WordPress,如何创建一个将服务器端 POST 到 Web api 的潜在客户 Web 表单?
- postgresql - postgres_fdw 和 uuid-ossp 缺少二进制文件