When creating a table in AWS - Athena with a CTAS statement, I'm trying to understand how the table is stored in S3 and how I can convert the output to CSV.
create table1 as
select col1, col2 from tbl
When looking at the table in S3, I see a folder structured as follows:
xxxxxxxecc-manifest.csv
xxxxxxxecc.metadata
folder_xxxxxxx/ with 3 xxxxxx.gz files
What is this type of storage called and how can I convert it to CSV?
By default, when creating a table in Athena the table type is set to HIVE
. The only other table type, at this time, is ICEBERG
.
The easiest way to export Athena queries as CSV would be from the console editor. Run your query, and then from the Recent queries tab, select the query execution and click Download results. This will download a CSV file.