Rocky
05/27/2026, 5:57 AMidentifier-fields option within the PROPERTIES clause when creating a StarRocks Iceberg table.
While identifier-fields is not a StarRocks-specific configuration, StarRocks allows you to pass arbitrary Iceberg table properties through the PROPERTIES block of the CREATE TABLE statement. These properties are then passed directly to the underlying Iceberg catalog.
Usage Example
When creating an Iceberg table, you can define the unique identifier columns like this:
sql
CREATE TABLE iceberg_catalog.db_name.my_table (
id INT NOT NULL,
name STRING,
event_time TIMESTAMP
)
PROPERTIES (
"identifier-fields" = "id" -- Specifies 'id' as the identifier field
);
Key Points to Note:
* Iceberg Specification: identifier-fields is part of the Apache Iceberg specification (often referred to as identifier-field-ids in metadata). It is used to define the set of columns that uniquely identify a row, which is essential for certain operations like Equality Deletes in Iceberg v2 tables.
* Property Format: The value is typically a comma-separated string of column names (e.g., "id, tenant_id").
* StarRocks Support: StarRocks (starting from v3.1.8, v3.2.3, and v3.3+) supports querying Iceberg v2 tables that use equality deletes based on these identifier fields.
* Requirements: In the Iceberg spec, columns used as identifier fields must be defined as NOT NULL.
If you are looking to define a primary key for a native StarRocks table (not an Iceberg table), you should instead use the PRIMARY KEY syntax within the table schema definition. For more details, you can refer to the Iceberg DDL operations in the L/) documentation.
References
• data_source/catalog/iceberg/iceberg_catalog.md
• data_source/feature-support-data-lake-analytics.md
• loading/Spark-connector-starrocks.md
• data_source/catalog/iceberg/iceberg_meta_table.md