Unable to delete a partition on Athena Table

0

I am running a simple drop partition query on a table which is partitioned on 3 columns - Load_date_string, mid, transaction_date in that order. Alter table Table_name drop partition (load_date_string = '2022-12-14 181434.139')

Enter image description here

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

I could see that you are trying to drop a partition in your query. As a general guidance, error in such scenarios come mostly due to the following reason.

1-> Please check if you are running this query in a table or view. i.e if "s4_gateway_transaction_base_tab_new" is a view or table.

2-> If "s4_gateway_transaction_base_tab_new" is a view, then partitions cant be deleted from view, since Athena doesn’t treat views as partitioned, a view is a logical table not a physical one.

3-> If "s4_gateway_transaction_base_tab_new" is a table, then you can check if the partition you are trying to drop exits or not, for this you can do a show partition query on the table, or you can even look that at the left side of the pane, it should be visible under table name.

4-> It could be an intermittent issue, please try to re run the query once.

AWS
지원 엔지니어
답변함 일 년 전
AWS
전문가
검토됨 일 년 전

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

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

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