RonJay
06/15/2026, 4:55 AMRocky
06/15/2026, 4:55 AMwrite.parquet.compression-codec and the StarRocks session variable connector_sink_compression_codec depends on whether you are sinking data into a managed Iceberg table or using the INSERT INTO FILES syntax.
1. Sinking into an Iceberg Table (via Catalog)
When you use INSERT INTO <iceberg_catalog>.<db>.<table>, StarRocks determines the compression codec using the following priority:
1. Iceberg Table Property: StarRocks first checks the write.parquet.compression-codec property defined in the Iceberg table's metadata.
2. Session Variable: If the table property is not set, StarRocks uses the value of the session variable connector_sink_compression_codec.
3. Default: If neither is set, it defaults to uncompressed.
2. Using INSERT INTO FILES
If you are specifically using the INSERT INTO FILES syntax (typically used to export data to a cloud storage path), the Iceberg table property does not apply because this operation bypasses Iceberg table metadata. The priority is:
1. Function Property: The compression property defined inside the FILES() table function (e.g., FILES("path"="..." , "compression"="snappy")).
2. Session Variable: If the compression property is omitted in the FILES() call, StarRocks uses the connector_sink_compression_codec session variable.
3. Default: Defaults to uncompressed.
Summary Table
Method | Highest Priority | Fallback
Catalog Sink (INSERT INTO iceberg_table) | write.parquet.compression-codec (Table Property) | connector_sink_compression_codec (Session Var)
Direct Export (INSERT INTO FILES) | compression (Property in FILES() function) | connector_sink_compression_codec (Session Var)
Note: The connector_sink_compression_codec variable was introduced in v3.2.3. Valid values include uncompressed, snappy, lz4, zstd, and gzip.
References
• sql-reference/System_variable.md
• unloading/unload_using_insert_into_files.md
• loading/loading_introduction/feature-support-loading-and-unloading.md
• loading/Flink-connector-starrocks.md
• sql-reference/sql-functions/table-functions/files.md
• data_source/catalog/hive_catalog.md