【问题标题】:Athena fails to parse collections with LazySimpleSerDeAthena 无法使用 LazySimpleSerDe 解析集合
【发布时间】:2017-09-28 07:31:21
【问题描述】:

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

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

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

有没有办法从 TSV 文件或类似于 Athena 的文件中加载集合字段?

【问题讨论】:

    标签: hadoop hive amazon-athena


    【解决方案1】:

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

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

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

    【讨论】:

    • 互联网上关于这方面的信息非常少,在问题解决后会尽可能接受自己的答案,但会很乐意接受更好的答案(例如,在修正错字后仍然可以使用的漫游,或其他)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-08-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-26
    • 1970-01-01
    相关资源
    最近更新 更多