AWS Glue + Athena跳过标题行

时间:2018-04-16 21:04:24

标签: amazon-cloudformation amazon-athena aws-glue

January 19, 2018 updates开始,Athena可以跳过文件的标题行,

  

支持忽略标头。您可以在定义表时使用skip.header.line.count属性,以允许Athena忽略标题。

我使用AWS Glue in Cloudformation来管理我的Athena表格。使用Glue Table Input,如何告诉Athena跳过标题行?

1 个答案:

答案 0 :(得分:2)

基于AWS::Glue::Table here的完整模板,进行更改,

Resources:
  ...
  MyGlueTable:
    ...
    Properties:
      ...
      TableInput:
        ...
        StorageDescriptor:
          ...
          SerdeInfo:
            Parameters: { "separatorChar" : "," }

要,

            Parameters:
              separatorChar : ","
              "skip.header.line.count" : 1

诀窍。