截至 2018 年 1 月 19 日更新,Athena 可以跳过文件的标题行,
支持忽略标头。您可以在定义表时使用
skip.header.line.count
属性,以允许 Athena 忽略标头。
我在 Cloudformation 中使用 AWS Glue 来管理我的 Athena 表。使用粘附表输入,如何告诉雅典娜跳过标题行?
基于此处AWS::Glue::Table
的完整模板,从
Resources:
...
MyGlueTable:
...
Properties:
...
TableInput:
...
StorageDescriptor:
...
SerdeInfo:
Parameters: { "separatorChar" : "," }
自
Parameters:
separatorChar : ","
"skip.header.line.count" : 1
能做到诀窍。