Interview's MateData Engineer
Interview's Mate

Data Engineer

SQL · Spark · Lakehouse · Streaming

Visualizer

DSA Visualizer
All 32 lessons
Custom Playground
Try your own examples

Learning

System Design
31 architecture topics
SQL Learning
160 foundations → production topics
AI Engineering
160 LLM → backend topics
Data Science
160 Python → MLOps topics
Data Engineer
160 SQL → streaming topics
Docker
160 Docker learning topics
Kubernetes
160 K8s fundamentals → cloud
Java LearnSoon
Coming soon
Python Learn
Interview Q&A & internals
JavaScript Learn
Closures, async & DOM Q&A
Tech Learn
Search, practise & track Q&A
AI DSA Practice
Solve coding problems
Theme
Home
Data Engineer topics
Lesson 95/ 160
05. Data Lakehouses & Open Table Formats

DuckDB + Iceberg / Delta Lake Local & Serverless Analytics

Analyze Iceberg/Delta tables locally or serverless with DuckDB without spinning a cluster.

IntermediateDuckDB · Iceberg · Delta3 quiz questions
Practice Generative AI Q&A
In plain wordsDiagramTheoryStep by stepWhen to use itInterview cluesMistakes to avoidQuiz (3)Practice

In plain words

Catalog/snapshot extension and object credentials. Next, manifest/log pruning, schema, and deletes. Finally, compact Parquet or return a bounded aggregate.

Think of it like…

DuckDB is a portable measuring room that reads an open-format inventory ledger; it avoids building a factory but inherits the room's benches, memory, and local crew limits.

Where you’ve seen it

INSTALL iceberg; LOAD iceberg; SELECT customer_id, sum(amount) FROM iceberg_scan('s3://lake/orders', allow_moved_paths=true) GROUP BY 1; Delta discovery similarly uses its extension and logs, not blind read_parquet of every file.

Words you’ll hear

DuckDB
An embedded SQL engine that can scan object files and table-format metadata in a single process.
Iceberg
A snapshot-based open table protocol whose manifests can guide file and delete scans.
Delta
A transaction-log open table protocol whose versioned files must be resolved instead of recursively reading the data directory.
Operational boundary
Not every table-format extension supports all deletes, schema evolution, or write/concurrency features, and DuckDB's process memory is the local join ceiling even if the lake stores petabytes. Verify the connector version and catalog metadata, pin snapshot/path, set threads and memory, rely on server-side filter pruning only when the table stats support it, and spill/export bounded results rather than acting as a shared server.

Visual diagram

Loading interactive diagram

Theory & deep dive

DuckDB: the working mechanism

DuckDB can load registered Iceberg table snapshots or Delta metadata/file sets for local or serverless SQL, combining object-store reads and vectorized execution without maintaining a cluster.

Catalog/snapshot extension and object credentials. Manifest/log pruning, schema, and deletes, then DuckDB vectorized joins with bounded memory; this exposes the state governed by Delta.

DuckDB + Iceberg / Delta Lake Local & Serverless Analytics in one concrete design

INSTALL iceberg; LOAD iceberg; SELECT customer_id, sum(amount) FROM iceberg_scan('s3://lake/orders', allow_moved_paths=true) GROUP BY 1; Delta discovery similarly uses its extension and logs, not blind read_parquet of every file.

Key takeaway: DuckDB can load registered Iceberg table snapshots or Delta metadata/file sets for local or serverless SQL, combining object-store reads and vectorized execution without maintaining a cluster

DuckDB + Iceberg / Delta Lake Local & Serverless Analytics: failure mode and production response

Not every table-format extension supports all deletes, schema evolution, or write/concurrency features, and DuckDB's process memory is the local join ceiling even if the lake stores petabytes.

Verify the connector version and catalog metadata, pin snapshot/path, set threads and memory, rely on server-side filter pruning only when the table stats support it, and spill/export bounded results rather than acting as a shared server. Track Pinned snapshot as "repeatable query must name a table version/time", and make Memory limit visible to the dataset owner.

Key takeaway: Verify the connector version and catalog metadata, pin snapshot/path, set threads and memory, rely on server-side filter pruning only when the table stats support it, and spill/export bounded results rather than acting as a shared server.

How it works, step by step

Step 1 of 4
DuckDB

1. Resolve table

Catalog/snapshot extension and object credentials. DuckDB can load registered Iceberg table snapshots or Delta metadata/file sets for local or serverless SQL, combining object-store reads and vectorized execution without maintaining a cluster.

catalog/snapshot extension and object credentials
Key numbers at this step
Pinned snapshot
repeatable query must name a table version/time
Iceberg
A snapshot-based open table protocol whose manifests can guide file and delete scans.

When to use it & trade-offs

What it is

DuckDB can load registered Iceberg table snapshots or Delta metadata/file sets for local or serverless SQL, combining object-store reads and vectorized execution without maintaining a cluster. INSTALL iceberg; LOAD iceberg; SELECT customer_id, sum(amount) FROM iceberg_scan('s3://lake/orders', allow_moved_paths=true) GROUP BY 1; Delta discovery similarly uses its extension and logs, not blind read_parquet of every file.

Why it matters: Not every table-format extension supports all deletes, schema evolution, or write/concurrency features, and DuckDB's process memory is the local join ceiling even if the lake stores petabytes. Verify the connector version and catalog metadata, pin snapshot/path, set threads and memory, rely on server-side filter pruning only when the table stats support it, and spill/export bounded results rather than acting as a shared server.

When to reach for it

  • Analyze Iceberg/Delta tables locally or serverless with DuckDB without spinning a cluster.
  • Choose DuckDB because it provides this capability: An embedded SQL engine that can scan object files and table-format metadata in a single process.
  • Keep evidence for Pinned snapshot at "repeatable query must name a table version/time" so the last production stage-Publish - compact Parquet or return a bounded aggregate-remains testable.

When to avoid or be careful

  • Not every table-format extension supports all deletes, schema evolution, or write/concurrency features, and DuckDB's process memory is the local join ceiling even if the lake stores petabytes.
  • Do not conflate Iceberg with DuckDB. The second concept contributes different behavior: A snapshot-based open table protocol whose manifests can guide file and delete scans.
  • Release only after this guardrail is in place: Verify the connector version and catalog metadata, pin snapshot/path, set threads and memory, rely on server-side filter pruning only when the table stats support it, and spill/export bounded results rather than acting as a shared server.

DuckDB / Iceberg / Delta - roles, limits, and operating cost

DuckDB
Best for: An embedded SQL engine that can scan object files and table-format metadata in a single process.

Strengths: An embedded SQL engine that can scan object files and table-format metadata in a single process. DuckDB can load registered Iceberg table snapshots or Delta metadata/file sets for local or serverless SQL, combining object-store reads and vectorized execution without maintaining a cluster.

Watch out: Not every table-format extension supports all deletes, schema evolution, or write/concurrency features, and DuckDB's process memory is the local join ceiling even if the lake stores petabytes.

Iceberg
Best for: A snapshot-based open table protocol whose manifests can guide file and delete scans.

Strengths: A snapshot-based open table protocol whose manifests can guide file and delete scans. In this workflow it supports: Execute - DuckDB vectorized joins with bounded memory.

Watch out: The operating cost is real: DuckDB process bound plus spill directory.

Delta
Best for: A transaction-log open table protocol whose versioned files must be resolved instead of recursively reading the data directory.

Strengths: A transaction-log open table protocol whose versioned files must be resolved instead of recursively reading the data directory. Its output can be checked with Feature matrix.

Watch out: Operating guardrail: Verify the connector version and catalog metadata, pin snapshot/path, set threads and memory, rely on server-side filter pruning only when the table stats support it, and spill/export bounded results rather than acting as a shared server.

Interview signals & numbers to know

When this topic comes up

  • “Where is the failure boundary for DuckDB, and how would Pinned snapshot reveal it?”
  • “Why is Iceberg distinct from this behavior: a transaction-log open table protocol whose versioned files must be resolved instead of recursively reading the data directory?”
  • Production clue: Not every table-format extension supports all deletes, schema evolution, or write/concurrency features, and DuckDB's process memory is the local join ceiling even if the lake stores petabytes.
  • Design probe: Verify the connector version and catalog metadata, pin snapshot/path, set threads and memory, rely on server-side filter pruning only when the table stats support it, and spill/export bounded results rather than acting as a shared server.

Benchmarks & rules of thumb

Pinned snapshot -
repeatable query must name a table version/time
Memory limit -
DuckDB process bound plus spill directory
Feature matrix -
deletes, partition evolution, and schema union depend on extension version

Common mistakes & follow-ups

Common interview mistakes

  • Not every table-format extension supports all deletes, schema evolution, or write/concurrency features, and DuckDB's process memory is the local join ceiling even if the lake stores petabytes.
  • Reporting success from a job exit code without checking Pinned snapshot and Memory limit.
  • Treating this example as complete without replay, rollback, or access boundaries: INSTALL iceberg; LOAD iceberg; SELECT customer_id, sum(amount) FROM iceberg_scan('s3://lake/orders', allow_moved_paths=true) GROUP BY 1; Delta discovery similarly uses its extension and logs, not blind read_parquet of every file.

Likely interviewer follow-ups

  • How would you prove this contract instead of only checking that the command ran: An embedded SQL engine that can scan object files and table-format metadata in a single process.
  • What does the recovery plan do when this occurs? Not every table-format extension supports all deletes, schema evolution, or write/concurrency features, and DuckDB's process memory is the local join ceiling even if the lake stores petabytes.
  • When is DuckDB insufficient for Memory limit, and what does adding Iceberg cost in Pinned snapshot?
Interview tip: Lead with the data path and failure boundary: DuckDB can load registered Iceberg table snapshots or Delta metadata/file sets for local or serverless SQL, combining object-store reads and vectorized execution without maintaining a cluster. Then make the answer operational: Verify the connector version and catalog metadata, pin snapshot/path, set threads and memory, rely on server-side filter pruning only when the table stats support it, and spill/export bounded results rather than acting as a shared server.

Knowledge check

Loading quiz

Put it into practice

Practice related interview Q&A

Apply DuckDB + Iceberg / Delta Lake Local & Serverless Analytics with data engineer interview Q&A and hands-on practice.

Open Data Engineer Q&A →Machine Learning Q&A
Previous topic
Query Engines for Lakehouses (Trino / Presto, StarRocks, ClickHouse, Dremio)
Next topic
Change Data Feed (CDF) & Incremental Lakehouse Processing