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

gefragt vor 3 Monaten675 Aufrufe
1 Antwort
0
Akzeptierte Antwort

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
EXPERTE
beantwortet vor 3 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen