<@U0A71G31CDV> I'm going to create an iceberg tabl...
# questions-and-troubleshooting
s
@Rocky I'm going to create an iceberg table with Starrocks, but does the option identifier-fields exist in properties? Where should I look at the document?
r
Yes, the property
identifier-fields
is supported when creating an Iceberg table in StarRocks, although it is not explicitly highlighted as a StarRocks-specific property in the main DDL documentation. In StarRocks, when you create an Iceberg table within an Iceberg catalog, you can pass standard Apache Iceberg table properties through the
PROPERTIES
clause. The
identifier-fields
property is used by Iceberg to define columns that uniquely identify a row (similar to a primary key). Where to look in the documentation You should refer to the Iceberg DDL operations page for the general syntax. While the documentation lists common properties like
location
,
file_format
, and
compression_codec
, it supports other valid Iceberg properties via the same
PROPERTIES
block. Example usage When creating the table, you can specify the identifier fields like this:
Copy code
sql
CREATE TABLE iceberg_catalog.db_name.table_name (
    id BIGINT NOT NULL,
    name STRING,
    event_time DATETIME
)
DISTRIBUTED BY HASH(id)
PROPERTIES (
    "identifier-fields" = "id"
);
For multiple columns:
Copy code
sql
PROPERTIES (
    "identifier-fields" = "id,name"
);
Key details to note: * Version requirement: Creating Iceberg tables and sinking data via
INSERT INTO
is supported from StarRocks v3.1 onwards. * Property Name: Ensure you use the hyphenated version
"identifier-fields"
. * Iceberg v2: Defining identifier fields is particularly useful for Iceberg v2 tables to support row-level updates and deletes (equality deletes). If you are using a newer version of StarRocks (v3.4.1+), you can also verify the set properties by querying the Iceberg metadata table:
Copy code
sql
SELECT * FROM <catalog>.<database>.<table>$properties;
Referencesdata_source/catalog/iceberg/DDL.mdtable_design/table_types/primary_key_table.mdsql-reference/sql-statements/table_bucket_part_index/CREATE_TABLE.md