liveBook · Manning

Iceberg branch

As explained in Architecting an Apache Iceberg Lakehouse

An Iceberg branch is a named reference to a table snapshot that supports independent versioned table-state progression.

An Iceberg branch is a named, mutable reference to a table snapshot. It can advance as new snapshots are added, making it useful for development, testing, controlled rollback, and reproducible data workflows. section 11.2.2

At the table level, a branch isolates one table’s evolving state. It differs from a tag, which immutably bookmarks one snapshot, and from catalog-level branching in Project Nessie, which can isolate and atomically merge changes across multiple tables. section 7.4.5 section 11.2.2

Operational use requires treating branches as part of snapshot and retention management:

  • Use a development branch that advances with new snapshots while production remains on a stable main branch. section 11.2.2
  • Use branches to isolate changes, support testing, and enable rollback without exposing incomplete table state. section 7.4.5 section 11.2.2
  • Review branch retention deliberately: protected snapshots cannot expire, so long-lived branches can increase metadata and data-file storage. section 10.3.2
SELECT ref_name, type, snapshot_id, max_reference_age_in_ms
FROM "db "."critical_fact_table.refs ";

Inspect a table’s refs metadata to identify each branch, its current snapshot, and any maximum reference age. section 11.2.2

How Architecting an Apache Iceberg Lakehouse covers it

How deep it goes
Defines mutable snapshot references, distinguishes branches from tags, and explains retention effects without detailing branch commands.
Examples
Uses main, dev, and release_2023_09 references plus a refs-table query showing snapshot identifiers and reference age.
What it assumes
Assumes familiarity with Iceberg tables and snapshots while establishing branch-versus-tag behavior and table-versus-catalog scope.
What you can do after
Operate/configure table references for isolated changes, reproducible reads, controlled rollback, and deliberate retention.
How it connects
Connects branches to Apache Iceberg snapshots, tags, snapshot expiration, compaction, ingestion, and Project Nessie.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Architecting an Apache Iceberg Lakehouse. The section links point to the parts of the book it draws on.