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ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ