AWS Athena - 更改字段以输入“MAP”
我有一个由 Glue 爬虫创建的 AWS athena 表,其中一个字段是字典的字符串表示形式,其中键和值都是字符串,例如: '{"key1": "value_1", "key2": "value2"}'
我尝试手动将字段类型更改为 MAPHIVE_PARTITION_SCHEMA_MISMATCH: There is a表和分区模式之间不匹配
意味着分区将字段存储为字符串,而在模式中字段更改为映射。
因此,我尝试运行 MSCK Repair table
但它只是将列类型恢复为字符串。
有没有办法在不丢失当前分区的情况下更改字段类型?
I have an AWS athena table created by a Glue crawler, with one of the fields is a string representation of a dictionary where the keys and values are strings e.g: '{"key1": "value_1", "key2":"value2"}'
I tried to manually change the field type to MAP<string,string>
but got an exception HIVE_PARTITION_SCHEMA_MISMATCH: There is a mismatch between the table and partition schemas
meaning that the partitions were storing the field as String while the in the schema the field changed to map.
So, I tried to run MSCK Repair table
but it just restored to type of the column to String.
Is there a way to change the field type without losing the current partitions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论