Merge into query using Iceberg table throws iceberg v2 support error

0

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 (target.id = source.Keys_id)
    WHEN MATCHED AND source.event_name = 'REMOVE' 
        THEN DELETE
    WHEN MATCHED AND source.event_name = 'MODIFY' 
        THEN UPDATE SET name = source.name, is_active = source.is_active, description = source.description, id = source.id
    WHEN NOT MATCHED AND source.event_name = 'INSERT' 
        THEN INSERT (description, id, is_active, name, number, price) 
            VALUES (source.description, source.id, source.is_active, source.name, NULL, NULL)
azmaktr
已提問 3 個月前檢視次數 363 次
1 個回答
0
已接受的答案

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

azmaktr
已回答 3 個月前

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

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

回答問題指南