Athena 无法使用 LazySimpleSerDe 解析集合

Athena fails to parse collections with LazySimpleSerDe

使用 LazySimpleSerDe 时,AWS Athena 似乎无法正确加载集合字段;设置 collection.delim 似乎没有效果,例如如此使用时:

WITH SERDEPROPERTIES (
'serialization.format' = '|',
'field.delim' = '|',
'collection.delim' = ',',
'line.delim' = '\n',
'mapkey.delim' = '@'
) 

这似乎是 运行 本地(在稍微不同的 Hadoop 版本上),但不是在 EMR 上。

有没有什么方法可以从 TSV 文件或类似于 Athena 的文件中加载集合字段?

显然当前(2017 年 9 月)Hive 版本的 Athena 在字段名称中包含错字:它被称为 'colelction.delim' (reference, relevant fix)。

在发布修复程序之前,使用拼写错误确实有效:

WITH SERDEPROPERTIES (
'serialization.format' = '|',
'field.delim' = '|',
'colelction.delim' = ',',
'mapkey.delim' = '@'