Is it possible to automate the replacement of a table in Athena?

0

I have 2 tables that are a "SELECT * FROM..." statement from their correspondant views. I update them by manually deleting the table and then creating it again using the CREATE TABLE statement.

Is there a way to automate this?

질문됨 일 년 전970회 조회
1개 답변
0

It's hard to tell exactly what you're trying to do based on the initial data that you provided.

Lambda and EventBridge If your queries are constant you can create a Lambda function that will interact with the AWS SDK. Additionally you could schedule the Lambda to run based on a cron expression with EventBridge (Cloud Watch Events).

Partitioned Tables If you're replacing the table to update the partition because new data was added to S3 then you can change your approach. MSCK REPAIR TABLE will update the metadata. Alternatively you can use ALTER TABLE ADD PARTITION.

Hopefully one of these approaches helps you. If they don't solve your problem, can you please elaborate on your situation and goal so that I can try to provide more appropriate help.

전문가
답변함 10달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠