# How Apache Iceberg tables work: metadata files, manifests, snapshots and hidden partitioning

An Iceberg table is a tree of small metadata files over ordinary Parquet. We build one with PyIceberg 0.12, watch each commit add a snapshot, see a filter on a timestamp prune two of three files without a partition column, and travel back in time after a delete.

A lakehouse stores tables as files in object storage and still promises the things a warehouse gives you: atomic commits, consistent reads, schema changes and time travel. The trick is a table format, a layer of metadata that says which files make up the table at each moment. Apache Iceberg is one of the most widely adopted of these formats, supported by engines such as Spark, Flink, Trino, DuckDB and the major cloud warehouses.

This article explains how an Iceberg table works from the inside. We create a real table on a laptop with PyIceberg 0.12.0 and a SQLite-backed catalog, commit three batches, run a filtered scan, delete rows, travel back in time and evolve the schema, and look at every file this produces. By the end, the diagram of metadata files, manifest lists and manifests will be something you have seen on disk, not just in a slide.

## What happened

### PyIceberg 0.12.0 (1 September 2026)

PyIceberg, the pure Python implementation of Iceberg, published version 0.12.0 on PyPI on 1 September 2026. It is the library used for every example below. Partition transforms such as `day()` now rely on the optional `pyiceberg-core` package when writing partitioned tables from Arrow; without it, an append to a day-partitioned table fails with an error asking you to install `pyiceberg[pyiceberg-core]`, which is exactly what happened in our first run.

### Apache Iceberg 1.12.0 (29 September 2026)

The Java reference implementation released 1.12.0 on 29 September 2026. According to the project's release notes, it removes Spark 3.4 support and Flink 2.0 support, removes position delete files that carry row data, and continues work on format version 4 with a v4 manifest reader, relative locations in manifests and deletion vectors that carry key metadata. The REST client now retries POST requests that carry an `Idempotency-Key` on retriable errors (408, 500, 502, 503 and 504).

## The idea: track files, not directories

Older Hive-style tables defined a table as "everything in this directory". Listing directories on object storage is slow, a half-written file is visible to readers, and two writers can trample each other. Iceberg's specification takes a different approach: the table format tracks individual data files instead of directories, and files become part of the table only through an explicit commit.

Every change writes a new **table metadata file** and then swaps the table's pointer from the old metadata file to the new one in a single atomic step. Readers keep using the snapshot they loaded until they refresh. Think of a library card catalogue where each edit produces a whole new card, and the librarian swaps the card in one motion. Nobody ever sees a half-edited card.

### The metadata tree

| Level | File | What it holds |
|---|---|---|
| Catalog | A database row, REST service or similar | The current metadata file location for each table name |
| Table metadata | `NNNNN-uuid.metadata.json` | Schemas, partition specs, sort orders, properties, the list of snapshots and the current snapshot id |
| Manifest list | `snap-<id>-....avro` | One entry per manifest in a snapshot, with partition summaries and file counts |
| Manifest | `...-m0.avro` | One entry per data or delete file: path, partition values, record count, column statistics |
| Data files | Parquet, Avro or ORC | The rows themselves |

A scan reads from the top down and prunes at every level: the manifest list lets it skip whole manifests whose partition ranges cannot match, and manifests let it skip data files whose column statistics cannot match. Only then does it open Parquet files.

A useful analogy is a warehouse with a ledger. The metadata file is the ledger's front page, saying which stock count is current. The manifest list is the index of shelves for that count, and each manifest is a shelf label listing the boxes and what range of items each holds. A picker looking for one item reads the front page, finds the right shelves from the index, checks the labels and opens only the boxes that could contain it. Nobody walks every aisle, which is exactly what directory listing on object storage forces older table layouts to do.

The specification notes that in format version 4, still under active development and not yet formally adopted, the manifest list is replaced by an adaptive metadata tree, and data files and their deletion vectors are stored in a combined entry. Versions 1, 2 and 3 are complete and adopted.

## Building a table step by step

We create a catalog backed by SQLite, a namespace and an `orders` table partitioned by day of the `ts` column.

```python
from pyiceberg.catalog.sql import SqlCatalog
from pyiceberg.schema import Schema
from pyiceberg.types import NestedField, LongType, StringType, TimestampType, DoubleType
from pyiceberg.partitioning import PartitionSpec, PartitionField
from pyiceberg.transforms import DayTransform

cat = SqlCatalog("local", uri="sqlite:///wh/catalog.db", warehouse="file:///abs/path/wh")
cat.create_namespace("shop")

schema = Schema(
    NestedField(1, "order_id", LongType(), required=True),
    NestedField(2, "ts", TimestampType(), required=True),
    NestedField(3, "country", StringType()),
    NestedField(4, "amount", DoubleType()),
)
spec = PartitionSpec(PartitionField(source_id=2, field_id=1000,
                                    transform=DayTransform(), name="ts_day"))
orders = cat.create_table("shop.orders", schema=schema, partition_spec=spec)
```

Then we append three Arrow tables of 1,000 orders each, one for 20, 21 and 22 November 2026, with `orders.append(batch)`.

### What appeared on disk

After the three appends, the table directory contains:

| File | Count | Size each (bytes) |
|---|---|---|
| `data/ts_day=2026-11-20/...parquet` and two more day folders | 3 | about 8,500 to 8,900 |
| `metadata/0000N-....metadata.json` | 4 (create plus 3 appends) | 877, 1,717, 2,502, 3,287 |
| `metadata/snap-<id>-....avro` (manifest lists) | 3 | about 1,800 to 1,900 |
| `metadata/...-m0.avro` (manifests) | 3 | about 4,600 |

Four lessons are visible:

1. **Each commit writes a new metadata file.** The size grows by roughly 800 bytes per commit because each new file carries the full snapshot history.
2. **Each snapshot has its own manifest list.** The third snapshot's list points to all three manifests, so it describes the whole table.
3. **Manifests are reused.** The first append's manifest is still referenced by later snapshots, so appends write only one new manifest each.
4. **Snapshots carry useful summaries.** Snapshot 3 reports `added-data-files: 1`, `total-data-files: 3`, `added-records: 1000` and `total-records: 3000`, with sequence numbers 1, 2 and 3.

The metadata JSON itself has top-level keys you will meet in every Iceberg tool: `location`, `table-uuid`, `schemas`, `current-schema-id`, `partition-specs`, `snapshots`, `current-snapshot-id`, `snapshot-log`, `metadata-log`, `sort-orders`, `refs` and `format-version`.

## Hidden partitioning: prune without a partition column

In Hive-style tables, you partition by a separate column such as `order_date`, and every query must filter on that column or the engine scans everything. Iceberg instead stores a **transform** of an existing column, here `day(ts)`, and applies it to your filter automatically.

```python
from pyiceberg.expressions import And, GreaterThanOrEqual, LessThan

scan = orders.scan(row_filter=And(
    GreaterThanOrEqual("ts", "2026-11-21T00:00:00"),
    LessThan("ts", "2026-11-22T00:00:00")))
print(len(list(scan.plan_files())))   # 1
print(scan.to_arrow().num_rows)       # 1000
```

The filter mentions only `ts`, yet planning returns one data file out of three, the `ts_day=2026-11-21` file. The user never sees or types `ts_day`. Iceberg's transforms include identity, bucket, truncate, year, month, day, hour and, in version 3, multi-argument transforms. Because the spec is part of table metadata, you can also change partitioning later (for example from day to hour) without rewriting old data; old files keep their old spec.

| Partitioning style | Query must filter on | Changing layout later | Risk of wrong results |
|---|---|---|---|
| Hive-style column | The partition column itself | Rewrite the table | Users filter on `ts` and silently scan everything |
| Iceberg hidden partitioning | The source column, e.g. `ts` | Add a new spec; old files keep theirs | Low; pruning follows the source column |

## Deletes, time travel and schema evolution

### Deletes create a new snapshot

We deleted all French orders with `orders.delete(EqualTo("country", "FR"))`. The new snapshot's summary reports operation `overwrite`, `deleted-data-files: 3`, `added-data-files: 3`, `deleted-records: 3000`, `added-records: 2001` and `total-records: 2001`. In other words, PyIceberg used copy-on-write: it rewrote the three affected files without the 999 French rows.

Iceberg also supports merge-on-read, where a delete writes a small delete file instead of rewriting data. The specification's current representation is deletion vectors (format version 3 and above), which encode deleted row positions of one data file as a bitmap. Older representations are position delete files (version 2 only) and equality delete files, which version 4 no longer allows writers to create.

| Strategy | Write cost | Read cost | Best for |
|---|---|---|---|
| Copy-on-write | High: rewrite every touched file | Low: files are clean | Rare, large deletes; read-heavy tables |
| Merge-on-read with deletion vectors | Low: write a small bitmap | Some: apply bitmaps at read time | Frequent small updates and deletes, CDC |

### Time travel is just reading an older snapshot

The old data files were not deleted; the new snapshot simply stopped referencing them. Reading the first snapshot by id returns its 1,000 rows:

```python
first_id = orders.snapshots()[0].snapshot_id
orders.scan(snapshot_id=first_id).to_arrow().num_rows   # 1000
```

This is why Iceberg tables need maintenance. Old snapshots keep old files alive until you expire them, and frequent small commits leave many small files and manifests. Snapshot expiration, orphan file removal and compaction are routine jobs, covered on the [Iceberg compaction page](/tools/iceberg-compaction).

### Schema evolution by column id

Adding a column is a metadata-only change:

```python
from pyiceberg.types import StringType
with orders.update_schema() as update:
    update.add_column("channel", StringType())
```

The new schema lists `5: channel: optional string`. Iceberg identifies columns by id, not by name or position, so renaming or reordering columns never makes old Parquet files read the wrong data. Old files simply have no values for field 5, and readers return nulls. More on this in [schema evolution](/tools/schema-evolution).

## Catalogs: who holds the pointer

The atomic swap needs someone to hold the pointer to the current metadata file. That is the catalog's job. Our example used a SQL catalog in SQLite. Production deployments use the Iceberg REST catalog protocol, cloud catalogs such as AWS Glue, or services such as Polaris, Nessie or Unity Catalog. The [Iceberg cataloging page](/tools/iceberg-cataloging) compares them.

Writers use optimistic concurrency. A writer prepares new manifests and a new metadata file based on the snapshot it read, then asks the catalog to swap the pointer only if it still points at that base. If another writer committed first, the swap fails and the writer retries on the new base. Iceberg 1.12's idempotency keys for REST POST retries make those retries safer when a network error hides whether a commit landed.

## What it means in practice

Iceberg turns a folder of Parquet files into a table with transactions, history and safe schema changes, and it does so with plain files any engine can read. That is the core promise of the [lakehouse](/tools/lakehouse): one copy of the data, many engines. The practical costs are maintenance and catalog choice. A table that receives a commit every minute produces about 1,440 snapshots and metadata files a day, so schedule expiration and compaction from day one.

Iceberg sits alongside [Delta Lake](/tools/delta-lake) and [Apache Hudi](/tools/apache-hudi) as the main open table formats, with similar ideas and different metadata layouts. The [lakehouse topic page](/topics/big-data/lakehouse) and the [Apache Iceberg tool page](/tools/apache-iceberg) go further.

## What to do now

1. **Build a toy table.** Run the PyIceberg example with a SQL catalog and open the metadata JSON and Avro files to see the tree for yourself.
2. **Use hidden partitioning.** Partition by a transform of a timestamp (`day`, `hour`) instead of adding a separate date column.
3. **Check pruning in plans.** Confirm that typical filters plan only a fraction of files before tuning anything else.
4. **Pick a delete strategy per table.** Use copy-on-write for rare bulk deletes and merge-on-read for frequent updates such as CDC.
5. **Schedule maintenance.** Expire snapshots, remove orphan files and compact small files and manifests on a schedule.
6. **Choose a catalog deliberately.** Prefer a REST-compatible catalog if several engines must write to the same tables.
7. **Plan engine upgrades.** If you run Spark 3.4 or Flink 2.0 with Iceberg, note that 1.12.0 removed support for them.
8. **Keep format versions consistent.** Upgrade tables to version 3 only when every engine that reads them supports it.

## Risks and open questions

**Metadata grows with every commit.** Frequent small commits create many metadata files, manifests and snapshots; without maintenance, planning slows and storage creeps up.

**Format version mismatches break readers.** A table upgraded to version 3 cannot be read correctly by engines that support only version 2.

**Catalog lock-in replaces format lock-in.** The data is open, but the pointer lives in one catalog; moving catalogs needs planning.

**Version 4 is not adopted yet.** Implementations are adding v4 readers and writers ahead of the formal adoption, so avoid depending on v4 features in production until the specification is final.

**Watch next:** progress toward adopting format version 4 with its adaptive metadata tree, and how quickly engines support version 3 features such as deletion vectors, variant types and row lineage.

## Frequently asked questions

### What is the difference between a metadata file and a manifest in Iceberg?

The metadata file describes the whole table: schemas, partition specs and the list of snapshots. A manifest lists individual data or delete files with their partition values and column statistics. A manifest list connects a snapshot to its manifests.

### What is hidden partitioning?

It is partitioning by a transform of a column, such as `day(ts)`, stored in table metadata. Queries filter on the original column and Iceberg applies the transform for pruning, so users never need to know or filter on a separate partition column.

### How does Iceberg time travel work?

Each commit creates a new snapshot while old snapshots keep pointing at their files. Reading an older snapshot id or timestamp returns the table as it was then, until those snapshots are expired.

### Does Iceberg rewrite files when I delete rows?

It depends on the write mode. Copy-on-write rewrites affected files, as PyIceberg did in our example. Merge-on-read writes delete files, and in format version 3 these are deletion vectors, bitmaps of deleted row positions.

### Do I need Spark to use Iceberg?

No. Engines such as Flink, Trino, DuckDB and cloud warehouses read Iceberg, and PyIceberg can create, write and scan tables from Python, as shown in this article.

## Summary

An Iceberg table is a tree: a catalog points to a metadata file, which lists snapshots; each snapshot has a manifest list, which points to manifests, which list data and delete files with statistics. Every commit writes new metadata and swaps one pointer atomically, which gives consistent reads, time travel and safe concurrent writes. In our PyIceberg 0.12.0 example, three appends produced three snapshots, a timestamp filter planned one file out of three through hidden partitioning, a delete rewrote files in a new snapshot, and the original snapshot was still readable. Apache Iceberg 1.12.0, released on 29 September 2026, continues the move toward format version 4 while the community uses versions 1 to 3 in production.

## Sources

- [GitHub: Apache Iceberg table specification](https://github.com/apache/iceberg/blob/main/format/spec.md)
- [Apache Iceberg: Table spec](https://iceberg.apache.org/spec/)
- [GitHub: Apache Iceberg releases page, 1.12.0 release](https://github.com/apache/iceberg/blob/main/site/docs/releases.md)
- [Apache Iceberg: Releases](https://iceberg.apache.org/releases/)
- [PyPI: pyiceberg release history](https://pypi.org/project/pyiceberg/#history)
- [PyIceberg: Python API documentation](https://py.iceberg.apache.org/api/)
