DELETE FROM does not work on AWS Data Catalog table

0

Hello,

While trying to run this command DELETE FROM "datasets"."us_spending" in Athena, on a table from AWS Data Catalog, I had this error:

NOT_SUPPORTED: Cannot delete from non-managed Hive table
This query ran against the ‘datasets’ database, unless qualified by the query. Please post the error message on our forum  or contact customer support  with Query ID: 5c140e60-7534-44b5-a693-85ec1d645d4b

Does this means that I can't delete from the AWS Data Catalog tables, and only delete the entire table, and then recreate it ? Is there any method to delete rows based on where condition ?

Thank you,
Mihai

已提問 3 個月前檢視次數 672 次
1 個回答
0
已接受的答案

Hi,

as described in the Athena Documentation Delete works only with Iceberg tables.

Tables catalogued in the AWS Glue Catalog from file formats as csv, parquet, orc, json, etc. are append only; a data lake it is not transactional unless you start using an open table format as Iceberg, Hudi or Delta. Currently Athena supports only Iceberg for deletes.

To learn more on how to create and work with a Iceberg table in the AWS Glue Catalog refer to this documentation page from LakeFormation and the following blog posts: Introducing AWS Glue crawler and create table support for Apache Iceberg format , AWS Glue Data Catalog now supports automatic compaction of Apache Iceberg tables, Perform upserts in a data lake using Amazon Athena and Apache Iceberg

hope this helps

AWS
專家
已回答 3 個月前

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

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

回答問題指南