Update Trino-Iceberg-Integration.md

Chris Lu committed 2026-04-28 12:40:24 -07:00
1 parent d2d4646089
commit 0eafa5a3d2
1 file changed
+10
+10
@@ -35,6 +35,16 @@ s3.aws-secret-key=YOUR_SECRET_KEY
s3.region=us-east-1
```
### Recommended: `iceberg.unique-table-location=true`
Keep Trino's default `iceberg.unique-table-location=true` (already shown in the configuration above). With it enabled, each new table is created at a unique path `s3://<bucket>/<namespace>/<tableName>-<UUID>/`. The UUID suffix gives you three operational properties worth keeping:
- **Orphan-resistant `DROP` + `CREATE`** — if a `DROP TABLE` cleanup partially fails (filer error, crash mid-cleanup), a fresh `CREATE TABLE` with the same name lands at a new path and is not blocked or polluted by leftover files.
- **Crash-safe aborted creates** — a `CREATE TABLE` that wrote partial state but failed to commit leaves debris under one UUID; the retry uses a new UUID and proceeds cleanly.
- **Defense-in-depth against client-side empty-location pre-flight checks** — Trino runs `listFiles(<location>).hasNext()` before commit, and so do some other engines. With unique paths the check sees a fresh empty directory regardless of any historical state at the deterministic name.
If you prefer the cleaner `s3://<bucket>/<namespace>/<tableName>/` layout (one directory per table, no `<tableName>-<UUID>/` sibling), setting `iceberg.unique-table-location=false` is safe against SeaweedFS — you give up the resistance properties above. Pick whichever trade-off fits your operational model.
### Multi-Level Namespaces
To use nested namespaces (e.g., `db.schema`), add: