Reputation: 2338
I need to store Amazon Athena query results into New Amazon Athena Table.
Upvotes: 2
Views: 8446
Reputation: 2298
Updates:
Athena now supports Create Table as Select Queries (CTAS). Examples are available here.
They have implemented several nice features, namely the ability to apply compression to outputs (GZIP, SNAPPY) and supply output format.
Examples from the documentation:
CREATE TABLE new_table AS
SELECT *
FROM old_table;
And if you wish to update the table with new data, you must delete it first:
drop table new_table
Upvotes: 7