CSV is the only output format used by the Athena SELECT query, but you can use UNLOAD to write the output of a SELECT query to the formats that UNLOAD supports. Although you can use the CTAS statement to output data in formats other than CSV, those statements also require the creation of a table in Athena.
What formats does Athena support?
Q: Which data formats does Athena support? Athena supports various data formats like CSV, TSV, JSON, or Textfiles and also supports open-source columnar formats, such as ORC and Parquet. Athena also supports compressed data in Snappy, Zlib, LZO, and GZIP formats.
Can Athena read GZ file?
If your data is compressed, make sure the file name includes the compression extension, such as gz . The ZIP file format is not supported. For querying Amazon Kinesis Data Firehose logs from Athena, supported formats include GZIP compression or ORC files with SNAPPY compression.
How do I read an Athena JSON file?
1 For Athena to read JSON, the data should be in a single line. Remove the new line characters from the JSON file and upload the file to S3. 2 Login to the AWS Management Console and go to Athena. 3 To query the data in an S3 file we need to have an EXTERNAL table associated to the structure of the file.