Merge into query using Iceberg table throws iceberg v2 support error


I am trying to merge two iceberg tables using Athena but ran into error: "NOT_SUPPORTED: Iceberg table updates require at least format version 2". However, according to this aws documentation, Athena only supports iceberg v2 tables.

Here is the Athena query I am executing:

MERGE INTO new_db_test.dynamo_export AS target USING new_db_test.staging_table AS source
    ON ( = source.Keys_id)
    WHEN MATCHED AND source.event_name = 'REMOVE' 
    WHEN MATCHED AND source.event_name = 'MODIFY' 
        THEN UPDATE SET name =, is_active = source.is_active, description = source.description, id =
    WHEN NOT MATCHED AND source.event_name = 'INSERT' 
        THEN INSERT (description, id, is_active, name, number, price) 
            VALUES (source.description,, source.is_active,, NULL, NULL)
demandé il y a 2 mois308 vues
1 réponse
Réponse acceptée

I found the solution, the target table generated with spark is using table format version 1.0

répondu il y a 2 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions