Use SQL Studio to make supported metadata changes to an existing Foundry Iceberg table managed by another pipeline. You can create a branch or tag, or change selected write-layout and compression properties, without replacing the producing pipeline.
Each update runs once and does not save a SQL definition. You must have permission to write to the table.
Open SQL Studio in data mode and create or open a worksheet.
Enter one supported ALTER TABLE statement with the adhoc hint. For example, create a branch named audit:
Copied!1 2/*+ adhoc */ ALTER TABLE `/path/to/table` CREATE BRANCH audit
Select Run and wait for the build to succeed before using the new branch.
Run the following query to inspect the table's branches and tags:
Copied!1SELECT name, type, snapshot_id FROM `/path/to/table`.refs
Run each metadata update individually. Metadata updates cannot run together in a multi-statement query or as part of a transaction block.
| Operation | Supported options |
|---|---|
CREATE BRANCH | Optional IF NOT EXISTS or AS OF VERSION, without replacement or retention options |
CREATE TAG | Optional IF NOT EXISTS or AS OF VERSION, without replacement or retention options |
SET TBLPROPERTIES | Only the property keys listed below |
UNSET TBLPROPERTIES | Only the property keys listed below |
Supported property keys are case-sensitive:
| Property group | Allowed keys |
|---|---|
| File format | write.format.default, write.delete.format.default |
| Target file size | write.target-file-size-bytes, write.delete.target-file-size-bytes |
| Distribution | write.distribution-mode, write.delete.distribution-mode, write.update.distribution-mode, write.merge.distribution-mode |
| Parquet compression | write.parquet.compression-codec, write.delete.parquet.compression-codec, write.parquet.compression-level, write.delete.parquet.compression-level |
| Avro compression | write.avro.compression-codec, write.delete.avro.compression-codec, write.avro.compression-level, write.delete.avro.compression-level |
| ORC compression | write.orc.compression-codec, write.delete.orc.compression-codec, write.orc.compression-strategy, write.delete.orc.compression-strategy |
| Metadata compression | write.metadata.compression-codec |
For example, run this statement in SQL Studio to change compression for future Parquet writes without rewriting existing data files:
Copied!1 2/*+ adhoc */ ALTER TABLE `/path/to/table` SET TBLPROPERTIES ('write.parquet.compression-codec'='zstd')
Table properties are shared across branches. Changing a write property can affect future writes by the producing pipeline, not just writes on one branch.
A pipeline that replaces the table can reset property changes on its next build. Configure the properties in the producing pipeline when they must be reapplied on every build.
Ad hoc metadata updates on tables managed by another pipeline do not support:
INSERT, UPDATE, DELETE, or MERGEformat-version, retention, encryption, and storage-location settingsFor compaction, snapshot expiration, and other maintenance procedures, use the table's Maintenance tab. To change the table's data or schema, update its producing pipeline.