Tajinder
Tajinder

Reputation: 2338

Store Amazon Athena Query Results into new Table

I need to store Amazon Athena query results into New Amazon Athena Table.

Upvotes: 2

Views: 8446

Answers (2)

Zerodf
Zerodf

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

singh30
singh30

Reputation: 1503

Recently they have added Create Table as CTAS support to Athena.

Upvotes: 3

Related Questions