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

asked 3 months ago646 views
1 Answer
0
Accepted Answer

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
EXPERT
answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions