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
preguntada hace 4 años706 visualizaciones
1 Respuesta
0
Respuesta aceptada

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
EXPERTO
respondido hace 4 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas