1
votes

As of January 19, 2018 updates, Athena can skip the header row of files,

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

I use AWS Glue in Cloudformation to manage my Athena tables. Using the Glue Table Input, how can I tell Athena to skip the header row?

1

1 Answers

4
votes

Basing off the full template for AWS::Glue::Table here, making the change from,

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

To,

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

Does the trick.