Save / backup Athena view

0

From AWS documentation, i can see that one of the main differences between Athena views vs Athena CTAS tables is that views don't actually contain or write any data. If a customer wants to persist / back up a view, is the best practice to have them create a CTAS so the data is persisted in S3? Or something else? Thanks!

AWS
asked 4 years ago693 views
1 Answer
0
Accepted Answer

Hi ,

A View in SQL is a logical object and by design is ephemeral.

If the customer requirements is to have a persistent copy of the view they should use a CTAS.

If their goal is actually to save the query result (running on that view or even on a table) they can follow the instructions in this documents (to backup the full view they could run a Select * from View):

https://aws.amazon.com/premiumsupport/knowledge-center/access-download-athena-query-results/

https://docs.aws.amazon.com/athena/latest/ug/querying.html#query-results-specify-location

hope this helps

AWS
EXPERT
answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions