Query historical Iceberg table state using snapshot-id and as-of-timestamp time-travel syntax

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. Find available snapshots and their committed timestamps with SELECT snapshot_id, committed_at, operation FROM my_catalog.db.events.snapshots ORDER BY committed_at DESC.
  2. Query a specific snapshot by ID in Spark SQL with SELECT * FROM my_catalog.db.events VERSION AS OF 8904735921847234.
  3. Query by timestamp with SELECT * FROM my_catalog.db.events TIMESTAMP AS OF '2024-03-15 12:00:00' to get the state as of that point in time.
  4. In the Iceberg Java API or Python, set the snapshot option via SparkReadOptions or DataFrameReader.option('as-of-timestamp', epoch_millis) for programmatic access.
  5. Confirm the correct snapshot was resolved by comparing the schema and record count against the snapshots metadata table.

Known gotchas

Related routes

Perform Iceberg time travel queries using both snapshot ID and timestamp syntax across Spark and Trino
iceberg.apache.org · 5 steps · unrated
Query Iceberg metadata tables (snapshots, manifests, files, history) to inspect table internals
iceberg.apache.org · 5 steps · unrated
Query a Delta table at a prior version using versionAsOf and timestampAsOf time-travel options
docs.delta.io · 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