y2k6879 commented on issue #11341:
URL: https://github.com/apache/iceberg/issues/11341#issuecomment-2497144763

   I got same issue 
   
   I run the query below with spark sql,
   ```
   CREATE OR REPLACE TABLE my_db.my_table (
       id_iceberg STRING,
       ...
       edit_datetime TIMESTAMP,
       create_datetime TIMESTAMP)
   USING iceberg
   PARTITIONED BY (day(create_datetime))
   LOCATION 's3a://s3-bucket/iceberg/my_db/my_table'
   TBLPROPERTIES (
       'write.distribution-mode'='range',
       'format-version'='2',
       'write.format.default'='parquet',
       'write.parquet.compression-codec'='snappy',
       'iceberg.identifier-field-names' = 'id_iceberg'
   );
   ``` 
   
   then, i run the alter query with spark sql
   ``` 
   spark.sql("ALTER TABLE glue_catalog.my_db.my_table SET IDENTIFIER FIELDS 
id_iceberg")
   ``` 
   
   But, I got error 
   **pyspark.errors.exceptions.captured.IllegalArgumentException: Cannot add 
field id_iceberg as an identifier field: not a required field**
   
   i'm using 
   iceberg version : 1.4.3
   spark version : 3.4.2 (scala 2.12)
   


-- 
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-unsubscr...@iceberg.apache.org

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


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

Reply via email to