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
已提問 4 年前檢視次數 706 次
1 個回答
0
已接受的答案

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
專家
已回答 4 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南