Manage Iceberg table metadata compaction: rewrite manifests and expire old snapshots

domain: iceberg.apache.org · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Call the rewrite_manifests procedure to consolidate many small manifest files into fewer larger ones, reducing planning overhead
  2. Review snapshot history with SELECT * FROM table.snapshots to identify snapshots older than the retention window
  3. Call expire_snapshots with a timestamp threshold, confirming that only snapshots outside the retention period are removed
  4. Run remove_orphan_files after snapshot expiration to clean up data files that are no longer referenced by any live snapshot
  5. Monitor metadata file size in the catalog after each operation to verify improvement

Known gotchas

Related routes

Expire Iceberg snapshots and run rewrite_data_files compaction to merge small files and reclaim storage
iceberg.apache.org · 5 steps · unrated
Query Iceberg metadata tables (snapshots, manifests, files, history) to inspect table internals
iceberg.apache.org · 5 steps · unrated
Expire Iceberg snapshots and remove orphan files to reclaim storage
iceberg.apache.org · 5 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans