You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/11/13 17:16:54 UTC

[GitHub] [iceberg] krvikash commented on issue #6180: can't upsert v2 table by add hint /*+ OPTIONS('upsert-enabled'='true') */

krvikash commented on issue #6180:
URL: https://github.com/apache/iceberg/issues/6180#issuecomment-1312779669

   Hi @get1boat,
    
   You are missing the primary key while creating the table.
   
   > Enabling UPSERT mode using upsert-enabled in the [write options](#Write options) provides more flexibility than a table level config. Note that you still need to use v2 table format and specify the primary key when creating the table.
   
   https://iceberg.apache.org/docs/latest/flink/#upsert
   
   Please try adding a `PRIMARY KEY` while creating the table like below.
   
   `CREATE TABLE hive_catalog.ods_ice.tmp_lkj_kafka2iceberg( id varchar NOT NULL, create_time timestamp(6), user_id bigint, PRIMARY KEY(id) NOT ENFORCED ) WITH ( format = 'PARQUET', format_version = 2, location = 'hdfs://eva:8020/user/hive/warehouse/ods_ice.db/tmp_lkj_kafka2iceberg' ) ;`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org