<@U0A71G31CDV> please tell me about relation betwe...
# questions-and-troubleshooting
r
@Rocky please tell me about relation between iceberg table property of write.parquet.compression-codec and starrocks session config of connector_sink_compression_codec when i using insert into files
r
The relationship between the Iceberg table property
write.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
. Referencessql-reference/System_variable.mdunloading/unload_using_insert_into_files.mdloading/loading_introduction/feature-support-loading-and-unloading.mdloading/Flink-connector-starrocks.mdsql-reference/sql-functions/table-functions/files.mddata_source/catalog/hive_catalog.md