pray
pray

Reputation: 53

CSV row headers are not coming in Athena query from S3

I exported my SQL DB into CSV and imported those CSV files into S3. I Created Crawlers which are working fine. Now my CSV files have header row with Column Names. Those are not populating when I am sending query in Athena, The header row is also coming as datarow and columns are named as col0, col1 etc.

Please help

Upvotes: 1

Views: 1363

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 269151

Depending on your file format, you should be able to skip the header row by using this parameter in the table DDL:

TBLPROPERTIES (
  'skip.header.line.count'='1',
  ...
)

Upvotes: 2

Related Questions