问题
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.countproperty 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:
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.
来源:https://stackoverflow.com/questions/49866197/aws-glueathena-skip-header-row