> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# iceberg_* session settings

> ClickHouse session settings in the iceberg_* generated group.

These settings are available in [system.settings](https://clickhouse.com/docs/reference/system-tables/settings.md) and are autogenerated from [source](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp).

## iceberg\_delete\_data\_on\_drop

Type

Bool

Default

0

Whether to delete all iceberg files on drop or not.

## iceberg\_list\_only\_v\_prefixed\_metadata\_files

Type

Bool

Default

0

Find the latest metadata file of an Iceberg table read by path on S3 or Azure by listing only the key prefix `metadata/v`, so that the manifests stored in the same `metadata` directory are not listed. If it holds `.metadata.json` files, only they are candidates; otherwise the whole directory is listed. Does not apply with `iceberg_use_version_hint`, `iceberg_metadata_file_path`, `iceberg_metadata_table_uuid` or `iceberg_recent_metadata_file_by_last_updated_ms_field`, nor to the tables of a data lake catalog database.

Enable it only for tables whose metadata files are all named `v<N>...` (as ClickHouse and Hadoop catalogs name them): in a directory that also holds `<N>-<uuid>.metadata.json` files, those files are never candidates, so the commits of their writer are not seen.

## iceberg\_manifest\_min\_count\_to\_compact

[Experimental feature](https://clickhouse.com/docs/reference/settings/beta-and-experimental-features.md#experimental-features)

Type

UInt64

Default

100

Minimum number of manifest files required to trigger manifest-only compaction via OPTIMIZE TABLE ... MANIFEST.
If the current number of manifest files is less than or equal to this threshold, compaction is skipped.
Requires allow\_experimental\_iceberg\_compaction to be enabled.

The default mirrors the documented default of the Iceberg table property `commit.manifest.min-count-to-merge` (100),
see [https://iceberg.apache.org/docs/1.5.2/configuration/](https://iceberg.apache.org/docs/1.5.2/configuration/).

## iceberg\_max\_number\_datafiles\_to\_compact

Type

UInt64

Default

1000

Threshold for compaction data files in iceberg.

## iceberg\_orphan\_files\_min\_retention\_seconds

[Experimental feature](https://clickhouse.com/docs/reference/settings/beta-and-experimental-features.md#experimental-features)

Type

UInt64

Default

86400

Minimum age in seconds of the files that `ALTER TABLE ... EXECUTE remove_orphan_files` may delete from an Iceberg table. An `older_than` (given explicitly or derived from `iceberg_orphan_files_older_than_seconds`) that is closer to now than this is rejected: files of a write that has not committed yet are not referenced by the table metadata and would be deleted, which corrupts the table when the write commits. Keep it above the longest time a write to the table can take to commit. 0 disables the check.

## iceberg\_orphan\_files\_older\_than\_seconds

[Experimental feature](https://clickhouse.com/docs/reference/settings/beta-and-experimental-features.md#experimental-features)

Type

UInt64

Default

259200

Default age threshold in seconds for orphan file removal in Iceberg tables. Files newer than this are not considered orphans. Used when the older\_than argument is omitted from the remove\_orphan\_files() procedure call. Default is 259200 (3 days).

## iceberg\_snapshot\_id

Type

Int64

Default

0

Query Iceberg table using the specific snapshot id.

## iceberg\_timestamp\_ms

Type

Int64

Default

0

Query Iceberg table using the snapshot that was current at a specific timestamp.

## iceberg\_tolerate\_conflicting\_manifest\_schemas

Type

Bool

Default

1

If enabled and the schema-id of an Iceberg manifest file is already registered from metadata.json, the metadata.json schema is used and the copy in the `schema` key of the manifest file header is ignored without being compared. If disabled, the manifest header copy is compared with the metadata.json schema, and a conflict fails the query with an ICEBERG\_SPECIFICATION\_VIOLATION error.

The manifest header schema is only a copy of the table schema at the time the manifest was written, and some writers (e.g. AWS S3 Tables maintenance jobs) have been observed storing degraded copies there. Other query engines resolve schemas from metadata.json and ignore divergent header copies, so the default follows them. A conflict between two metadata.json schema definitions still always fails the query.
