AWS Glue+Athena 跳过 header 行

AWS Glue+Athena skip header row

January 19, 2018 updates 开始,Athena 可以跳过 header 行文件,

Support for ignoring headers. You can use the skip.header.line.count property when defining tables, to allow Athena to ignore headers.

我使用 AWS Glue in Cloudformation to manage my Athena tables. Using the Glue Table Input,如何让 Athena 跳过 header 行?

基于 AWS::Glue::Table 的完整模板,从

进行更改
Resources:
  ...
  MyGlueTable:
    ...
    Properties:
      ...
      TableInput:
        ...
        StorageDescriptor:
          ...
          SerdeInfo:
            Parameters: { "separatorChar" : "," }

至,

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

成功了。