Spark Lakehouse: PySpark, Delta, Iceberg & Streaming
Back to Lakehouse Formats: Delta Lake & Iceberg

Apache Iceberg: Spec, Partition Evolution & Catalogs

Snapshots, manifests, hidden partitioning, and multi-engine catalogs.

10 minutesVideo LessonPDF notes
🎯 Free Guest Mode: You are learning for free. Sign in to save your completion progress and quiz answers.
Loading progress...

Key moments

  1. Partitioning And Pruning — Partitioning lets the query engine skip files that do not match a predicate, which is called pruning.
  2. Old Rigid Directories — Older table formats used physical directories for partitions, making scheme changes expensive and rigid.
  3. Hidden Partitioning — Iceberg moves partition information into metadata and manifest files so data files can live anywhere.
  4. Partition Transforms — Built-in transforms like months, days, bucket, and truncate create partition values without extra columns.
  5. Manifest Pruning Example — A manifest entry stores transformed partition values, letting a March 2025 US query scan exactly one file.
  6. Partition Evolution — You can drop and add partition fields to change the spec for new data without rewriting old files.
  7. Evolution Visual — A query spanning April monthly and May daily partitions scans the whole April partition but prunes May days.
  8. Choosing Partitioning — Choose transforms based on query patterns, avoid over-partitioning, and target 100 MB to 1 GB partitions.
PDF notes

Frequently asked questions

What is hidden partitioning?

Iceberg stores partition values in metadata rather than physical directories, so you query raw columns and the engine prunes files automatically.

Does partition evolution rewrite existing data?

No. The new spec applies only to new writes; old files keep their original partitioning until you explicitly rewrite them.

How does Iceberg prune files?

It reads manifest files that store partition values, compares them to query predicates, and skips data files that cannot contain matching rows.

Which partition transform should I start with?

Use time-based transforms like months or days if your queries filter by time; use bucket or truncate for high-cardinality columns.

What file size should partitions target?

Aim for 100 MB to 1 GB per partition. Too small adds overhead; too large reduces pruning effectiveness.

Can I query old and new partitions together?

Yes. The engine reads manifests from all partition specs and stitches results into one coherent result set.

How was this lesson?

Your feedback helps us refine explanations and catch bugs.