How to modify iceberg.expire_snapshots.min-retention configuration

I have an iceberg table created using a python script (external to startbust), that later on I can use and manipulate using startbast. As a external Iceberg catalog I am using Glue.

For testing purposes I would like to delete all snapshots the table has using:


EXECUTE expire_snapshots(retention_threshold => ‘2d’)”

I have this error since the default value for this property is 7d:.
“Retention specified (2.00d) is shorter than the minimum retention configured in the system (7.00d). Minimum retention can be changed with iceberg.expire_snapshots.min-retention configuration property or iceberg.expire_snapshots_min_retention session property”

Does any one know how to modify the iceberg.expire_snapshots.min-retention configuration?

set session YOUR_CATALOG.expire_snapshots_min_retention = '1d' will fix it for the current session.

To make this a catalog setting for everyone w/o requiring them to override it, then for SEP you can update the connector’s General configuration to have iceberg.expire_snapshots.min-retention explicitly set to something different than the default value of 7d as called out in Iceberg connector — Trino 448 Documentation.

On Galaxy, I don’t think you can change this for the catalog as a general setting (at least not today), but you can absolutely set it as a session property as that’s where I tested the first line of this response at.

1 Like

Thanks a lot for the answer! This indeed solved my problem!