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)
질문됨 2달 전338회 조회
1개 답변
수락된 답변

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

답변함 2달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠