Skip to main content

Data Lakehouse Architecture

1. Executive Summary​

A data lakehouse unifies the low-cost, schema-flexible storage of a data lake (object storage such as S3, GCS, or ADLS) with the transactional semantics, schema enforcement, and performance optimizations traditionally associated with a data warehouse. The architectural breakthrough is not a single product—it is the open table format layer (Apache Iceberg, Delta Lake, Apache Hudi) that sits above Parquet/ORC files and provides ACID transactions, time travel, schema evolution, and concurrent writers on commodity object storage.

The medallion architecture (bronze/silver/gold) is the dominant organizational pattern: raw ingestion (bronze), cleaned and conformed data (silver), and business-ready aggregates (gold). Lakehouses power modern analytics platforms at Netflix, Uber, Apple, and thousands of enterprises replacing siloed lake + warehouse stacks with a single governed platform.

For principal architects, the lakehouse decision is a consistency, cost, and governance tradeoff: you gain elasticity and open formats but inherit compaction, metadata scaling, small-file problems, and multi-engine coordination complexity that warehouses hide behind managed infrastructure.

2. Why This Topic Matters​

Lakehouse architecture appears in principal interviews when organizations consolidate Spark/Flink pipelines, BI tools, and ML feature stores onto shared storage. Panels probe:

  • Open table formats—how ACID works without a traditional database server.
  • Medallion vs data mesh—organizational and technical boundaries.
  • Lake vs warehouse vs lakehouse—when each wins.
  • Concurrency—what happens when two Spark jobs commit simultaneously.
  • Governance—row/column policies across engines (Trino, Spark, Snowflake external tables).

Misunderstanding lakehouses leads to "S3 with Parquet" designs that lack idempotent pipelines, explode metadata, or corrupt tables under concurrent writes.

3. Problems Being Solved​

ProblemLakehouse approach
Expensive proprietary warehouse storageDecouple compute; store in object storage
Unreliable data lakesACID + schema enforcement via table format
Duplicate ETL to lake and warehouseSingle source of truth with multiple query engines
ML + analytics silosShared tables for features and BI
Time travel / auditSnapshot isolation per table format
Schema driftEvolution rules in metadata layer

Workload fit matrix​

WorkloadFitCaveat
Batch analytics (TB–PB)StrongCompaction and partition design matter
Streaming ingestionStrongRequires streaming writers + idempotency
Low-latency OLTPWeakNot a replacement for operational databases
Ad hoc SQL (sub-second)ModerateNeeds indexing, caching, or warehouse overlay
ML feature engineeringStrongPoint-in-time correctness requires discipline
Regulatory audit / replayStrongTime travel and lineage integration

4. Assumptions and System Model​

AssumptionImplication
Object storage is durable and eventually consistent listingList-after-write visibility; retry semantics vary by cloud
Compute is ephemeralSpark/Flink clusters scale independently of storage
Table format provides atomic commitSingle metadata pointer swap per commit
Readers use consistent snapshotSnapshot isolation; no dirty reads of in-flight writes
Network egress costs are non-trivialCo-locate compute with data region

Safety: Committed snapshots are durable; readers never see partial multi-file writes after commit. Liveness: Writers may retry on commit conflicts; heavy compaction backlog can delay optimal read performance without blocking correctness.

5. Essential Terminology​

TermDefinition
Open table formatSpecification for table metadata, snapshots, and file layout (Iceberg, Delta, Hudi)
Medallion architectureBronze (raw) → silver (cleaned) → gold (curated) layering
SnapshotPoint-in-time consistent view of table files
CompactionMerging small files into larger objects for scan efficiency
PartitionLogical subdivision (often by date/region) affecting pruning
Manifest / metadata fileCatalog of data files belonging to a snapshot
COPY-ON-WRITE (COW)Updates rewrite data files (Iceberg default for many ops)
MERGE-ON-READ (MOR)Updates logged separately; compacted later (Hudi MOR)
Z-orderingMulti-dimensional clustering for scan pruning (Delta)
Data skippingMin/max statistics in metadata to avoid reading irrelevant files

6. Core Mechanism​

6.1 Layered architecture​

Figure 1: Engines share a table format layer; object storage holds immutable data files; metadata atomically advances snapshots.

6.2 Atomic commit (simplified)​

Figure 2: Compare-and-swap on metadata version ensures exactly one writer advances the table snapshot.

6.3 Medallion pipeline​

Figure 3: Progressive refinement with increasing quality and decreasing schema variance toward consumption.

6.4 Format comparison (implementation choices)​

DimensionApache IcebergDelta LakeApache Hudi
Originating ecosystemNetflix → ApacheDatabricksUber → Apache
Catalog integrationREST, Hive, Glue, NessieUnity Catalog, HiveHive, Glue
Row-level updatesMerge (v2)MergeUpsert, MOR/COW
Hidden partitioningYesPartition columns explicitYes (timeline)
Engine breadthSpark, Flink, Trino, etc.Spark-first; growingSpark, Flink

Verify current version features in official docs—formats evolve rapidly.

7. Step-by-Step Walkthrough​

Walkthrough A: Batch ingest to bronze​

  1. Landing zone receives JSON/CSV from Kafka or API dumps.
  2. Spark job reads landing files, adds _ingest_ts and _source metadata columns.
  3. Writer appends to bronze.events Iceberg table partitioned by ingest_date.
  4. Commit succeeds; snapshot N+1 visible to readers.
  5. Orchestrator (Airflow/Dagster) marks partition complete; moves landing files to archive.

Walkthrough B: Silver transformation with deduplication​

  1. Silver job reads bronze snapshot at version V (idempotent re-run uses same V or later).
  2. Applies schema validation, PII tokenization, dedup on event_id.
  3. MERGE INTO silver table on primary key.
  4. On commit conflict, job retries with exponential backoff.
  5. Data quality checks assert row count bounds before promoting to gold consumers.

Walkthrough C: Time-travel audit​

  1. Compliance requests state of customers table as of 2025-06-01T00:00:00Z.
  2. Analyst runs SELECT ... FOR VERSION AS OF or timestamp equivalent.
  3. Engine resolves snapshot ID from metadata; scans only files in that snapshot.
  4. Result exported to audit bucket with lineage ticket reference.

Walkthrough D: Compaction after streaming micro-batches​

  1. Flink writes 5-minute micro-batches creating hundreds of small Parquet files.
  2. Compaction job (OPTIMIZE in Delta, rewrite_data_files in Iceberg) merges files per partition.
  3. Old files marked deleted in new snapshot; orphan cleanup policy runs separately.
  4. BI queries see improved scan parallelism and reduced LIST operations.

Walkthrough E: Iceberg vs Delta coexistence decision​

  1. Architecture review evaluates engine mix: Databricks-heavy teams lean Delta; multi-engine (Flink + Trino + Spark) lean Iceberg.
  2. Proof-of-concept runs concurrent readers on same table format with representative queries.
  3. Catalog choice finalized: Glue + Iceberg REST or Unity Catalog for Delta.
  4. ADR documents format lock-in risk and migration escape hatch (export Parquet, re-register).
  5. Platform team publishes golden path templates for bronze/silver/gold dbt models.

Walkthrough F: Schema evolution without breaking consumers​

  1. Silver table adds nullable column customer_tier with default unknown.
  2. Iceberg schema evolution commits; old snapshots retain old schema for time travel.
  3. Gold dbt models updated in same release train; contract tests assert column presence.
  4. BI semantic layer versioned; dashboards using old views continue until deprecation window ends.
  5. Governance catalog marks schema version bump; lineage shows downstream impact count.

8. Invariants and Guarantees​

PropertyLakehouse guarantee
AtomicitySnapshot commit is all-or-nothing
ConsistencySchema and partition specs enforced at write
IsolationSnapshot isolation for readers
DurabilityCommitted files durable per object storage SLA
Serializability of writesOne winning writer per commit attempt; losers retry

Not guaranteed: Sub-second interactive latency without additional indexing layers; cross-table transactional consistency (unless application-level or specialized catalogs).

9. Failure Scenarios​

FailureBehaviorMitigation
Concurrent write conflictCommit fails; job retriesIdempotent MERGE keys; partition serial writers
Small file explosionMetadata bloat; slow queriesScheduled compaction; target file size tuning
Orphan files after failed commitStorage cost leakLifecycle rules + orphan file cleanup jobs
Schema incompatibilityWrite rejectedSchema evolution policies; contract tests
Catalog outageCannot resolve table metadataHA catalog; cached metastore
Partition skewHot partitions; straggler tasksSalting; redesign partition keys
Zombie snapshot retentionStorage growthRetention policies; expire_snapshots

Scenario narrative​

A nightly and hourly job both MERGE into silver.orders. The hourly job commits first; nightly job's CAS fails at 03:00. Without retry logic, silver is stale until manual intervention. Production pipelines must treat commit conflicts as expected, not exceptional.

10. Performance Characteristics​

DimensionBehavior
Scan throughputScales with file parallelism; depends on file sizes
Write latencyMetadata commit + file upload; not OLTP-grade
Metadata operationsO(files in snapshot) for planning; manifests amortize
Compaction costRewrite I/O; schedule off-peak
Partition pruningCritical for petabyte tables

Object storage LIST latency can dominate planning for tables with millions of files—compaction and partition design are performance architecture, not optional tuning.

11. Scalability Limits​

  • Metadata file count per table—billions of files require aggressive compaction and partitioning strategy.
  • Single partition hotspots limit write parallelism.
  • Cross-region reads incur egress and latency.
  • Concurrent writers to same partition serialize at commit layer.
  • Catalog as control plane can become bottleneck at extreme scale.

12. Operational Considerations​

  • Define SLAs per medallion layer (bronze freshness vs gold correctness).
  • Automate compaction, snapshot expiration, and orphan cleanup.
  • Monitor files per partition, commit conflict rate, job duration variance.
  • Version-pin table format and engine combinations in production.
  • Run disaster recovery drills: restore catalog + validate snapshot integrity.
  • Document partition evolution procedure before changing keys on PB tables.
  • Integrate data quality gates between silver and gold promotion.

13. Security Considerations​

  • IAM policies on bucket prefixes per environment (dev/staging/prod).
  • Column-level encryption or tokenization before bronze when PII present.
  • Lake Formation / Unity Catalog / Ranger for fine-grained access across engines.
  • Audit logs on catalog access and sensitive table reads.
  • Network isolation: private endpoints to object storage; no public buckets.

14. Cost Considerations​

  • Storage: cheap at rest; expensive when duplicated across snapshots without expiration.
  • Compute: Spark/Flink cluster hours for ETL and compaction.
  • API costs: LIST/GET requests during query planning.
  • Egress: cross-AZ and cross-region data movement.
  • Hidden cost: engineer time for file layout and incident response.

FinOps principle: gold tables should be smaller and better partitioned than bronze—if gold scans are petabyte-wide, the medallion failed its curation purpose.

15. Production Implementations​

Case study: Unified analytics platform (illustrative)​

Business context​

Retail enterprise runs separate Hadoop lake and cloud warehouse; duplicate pipelines, inconsistent metrics, $4M+ annual warehouse storage. Mandate: single metrics layer for BI and ML.

Scale​

Illustrative: 20 PB object storage; 5,000 tables; 200 daily pipelines; 400 analysts.

Architecture overview​

S3 + Apache Iceberg + Glue catalog + EMR Spark for ETL + Trino for ad hoc SQL + dbt for gold transformations. Bronze ingests from Kafka and SFTP. Silver enforces contracts. Gold exports to semantic layer (Looker/MetricFlow).

Partitioning​

event_date + region for fact tables; dimension tables unpartitioned with periodic full refresh.

Consistency​

Snapshot isolation; MERGE idempotency keys on order_id. No cross-table transactions—workflow orchestration ensures gold runs after silver SLA.

Failure handling​

Airflow sensors on upstream freshness; commit conflict retries (3x); DLQ for poison bronze records.

Evolution​

Phase 1: lift-and-shift warehouse exports to bronze. Phase 2: retire duplicate warehouse marts. Phase 3: ML features read gold directly.

Extended operations narrative​

Six months post-launch, commit conflict rate spiked on silver.orders when hourly and nightly MERGE jobs overlapped. Platform team introduced partition-level job locks in Airflow and reduced conflicts 94%. Compaction backlog grew during Black Friday—dedicated OPTIMIZE warehouse slot added Tuesdays and Fridays. FinOps attributed $180k annual savings vs prior warehouse-only stack [illustrative—verify in your org]. Key lesson: lakehouse TCO includes platform engineering headcount, not just S3 storage lines.

Tradeoffs​

ChoiceTradeoff
Iceberg over DeltaEngine neutrality vs Databricks integration depth
Trino for ad hocFlexibility vs managed warehouse performance
Daily gold onlyCost vs near-real-time dashboards

Interview lessons​

Articulate why lakehouse vs warehouse; quantify compaction and metadata ops; governance across engines.

Platform team operating model​

Lakehouse platforms require dedicated data platform engineering—not a one-time migration project. Standing responsibilities include: table format upgrades, compaction SLOs, catalog hygiene, cost attribution per domain, and on-call for failed commits during peak ETL. Principal architects staffing this function should plan 1 platform engineer per 50–100 active pipelines as a rough order-of-magnitude [org-dependent, not a universal benchmark].

Anti-patterns observed in production​

Anti-patternSymptomRemediation
Bronze overload90% storage in raw JSONAggressive silver promotion
No snapshot expiryStorage bill 3× expectedexpire_snapshots policy
Shared write partitionCommit conflict stormsPartition ownership
BI on bronzeSchema chaosEnforce gold-only BI access
Manual compactionWeekly fire drillsScheduled OPTIMIZE jobs

16. Alternatives and Tradeoffs​

ApproachWhen to choose
Traditional warehouse (Snowflake, BigQuery)Managed performance, less file ops burden
Raw data lake onlyExploratory science; weak governance tolerance
LakehouseOpen formats, multi-engine, cost at scale
Data meshOrganizational decentralization; can use lakehouse per domain
HTAP databaseOperational analytics on transactional data

17. Common Misconceptions​

MisconceptionReality
"Parquet on S3 is a lakehouse"Missing ACID metadata and governance
"Lakehouse replaces warehouse always"Many teams run hybrid with warehouse serving layer
"One big table is fine"Partitioning and file layout determine viability
"ACID means cross-table transactions"Typically single-table snapshot atomicity
"Compaction is optional"Required for sustained performance

18. Principal Architect Perspective​

  1. Pick table format based on engine ecosystem and catalog strategy—not hype.
  2. Invest in medallion contracts early; bronze permissive, gold strict.
  3. Treat compaction as production workload with SLOs, not ad hoc scripts.
  4. Plan governance before 500 tables, not after.
  5. Measure cost per curated GB in gold—not just storage totals.

19. Architecture Review Exercise​

Scenario: Team proposes 1-minute micro-batches to gold fact table with 50 columns, no compaction, shared partition ingest_date only.

Findings: Small-file death spiral; hot partition; BI scans degrade within weeks. Recommend: silver buffering, hourly compaction, composite partition (date, hour), aggregate before gold.

20. Whiteboard Explanation​

"Data lands in object storage as Parquet files, but files alone aren't a database. An open table format maintains a metadata layer—manifests listing files, schemas, partitions, and snapshots. When a Spark job writes, it uploads new files then atomically swaps the metadata pointer from snapshot N to N+1 using compare-and-swap, so readers always see a consistent snapshot. Bronze keeps raw data; silver cleans and deduplicates; gold serves BI and ML. Multiple engines—Spark, Flink, Trino—read the same tables if they support the format. The hard parts are compaction, concurrent write retries, and governance across engines—not the diagram."

Principal addendum: When asked "lakehouse vs warehouse," draw cost axes: storage $/TB, compute elasticity, and ops headcount. Warehouse wins on time-to-first-query for undifferentiated SQL; lakehouse wins on petabyte economics and ML co-location. Hybrid is common—do not force binary choice in enterprise landscapes.

21. Interview Questions​

  1. What is a lakehouse? — Lake storage + warehouse-like ACID and schema via table formats.
  2. How does ACID work on S3? — Atomic metadata commit; immutable data files.
  3. Bronze vs silver vs gold? — Progressive refinement and trust levels.
  4. Iceberg vs Delta vs Hudi? — Ecosystem, merge semantics, catalog—tradeoffs.
  5. What is snapshot isolation? — Readers pin a snapshot version.
  6. Why compaction? — Reduce small files and metadata overhead.
  7. Concurrent write failure mode? — Commit conflict; retry required.
  8. Lake vs warehouse cost model? — Decoupled storage/compute vs integrated unit.
  9. Time travel use cases? — Audit, rollback, reproducible ML training.
  10. When not lakehouse? — Low-latency OLTP, tiny datasets, team lacks Spark ops.
  11. Partition skew symptoms? — Single task dominates; uneven file counts.
  12. Data mesh relationship? — Complementary; mesh is organizational, lakehouse is technical.
  13. Exactly-once ingestion? — Idempotent writes + deterministic keys + format commits.
  14. Governance challenge? — Same policy across heterogeneous query engines.

Scoring rubric (principal)​

DimensionStrongWeak
ACID mechanismMetadata CAS, immutable files"S3 is transactional"
OperationsCompaction, conflicts, orphansIgnores file layout
TradeoffsHybrid warehouse scenarios"Lakehouse replaces all"
GovernanceCatalog, lineage, PIIBucket IAM only

22. Interview Follow-Ups​

  1. Design medallion for clickstream at 1M events/sec. — Kafka → Flink bronze; micro-batch silver; agg gold; compaction schedule.
  2. Two teams write same Iceberg table—safe? — Possible with retry; better partition ownership or serial writes per partition.
  3. Recover from bad gold deploy. — Time travel to prior snapshot; rollback workflow.
  4. Cost of keeping 90 days snapshots? — Storage multiplication; expire_snapshots policy.
  5. BI needs sub-5s queries on 500 TB. — Materialized aggregates, indexing (Iceberg deletes vectors), or warehouse sync.

22A. Production Low-Level Design (Interview + Game Day)​

Medallion lakehouse on object storage with Iceberg/Delta commits. Production LLD and Game Day Standard.

Control vs data plane​

PlaneComponents
ControlCatalog (Glue/Hive), snapshot metadata CAS, compaction jobs, governance tags
DataBronze Parquet files, silver/gold tables, query engines (Spark/Trino/Flink)

Step-by-step commit path:

StepActionACID mechanism
1Writer stages new data files in object storageFiles immutable
2Writer commits new metadata JSONCatalog CAS on snapshot pointer
3Readers pin old snapshotSnapshot isolation
4Concurrent writer conflictRetry with exponential backoff
5Compaction merges small filesNew snapshot; old files orphan until GC

Table contract​

LayerFormatFreshness SLO
BronzeAppend-only ParquetNear real-time
SilverMERGE upserts15 min micro-batch
GoldAggregated1h or on-demand refresh

One SLO​

Lakehouse query freshness: gold tables lag source events < 1h p99; compaction completes before read amplification alert.


22B. Game Day Playbooks​

#DrillInjectDetectMitigateVerify
GD-1Bad gold deployWrong aggregation logic shippedBI dashboard anomalyTime travel to prior snapshotMetrics match baseline
GD-2Catalog CAS failureSimulate catalog outageWriters fail commitFailover catalog; pause writersNo torn reads
GD-3Small-file explosionStop compaction 7dQuery p99 regressionEmergency compaction jobFile count normalized

GD-1 — Rollback via time travel​

23. Strong Answer Example​

Question: "How does a lakehouse provide ACID on object storage?"

Answer this as a 45-minute greenfield design using the PRACTICE framework. Below is how a strong student sounds aloud—separate object storage durability from table-format atomicity, then walk the commit protocol.

PRACTICE interview answer map for lakehouse ACID on object storage

Figure A: PRACTICE map — Problem → Requirements → Assumptions → Capacity → Topology → Invariants → Constraints → Evolution.


Student interview script (PRACTICE)​

P — Problem framing​

"Object storage like S3 gives durable, immutable object PUTs—but not multi-file transactions. A naive lake of Parquet files has no atomic commit: readers can see half a write, and concurrent Spark jobs can corrupt the table.

A lakehouse fixes that with an open table format (Iceberg, Delta Lake, Hudi) that adds a metadata + catalog commit protocol on top of those files—so we get table-level ACID without a traditional database server.

Non-goals for v1: OLTP low-latency row updates, and true cross-table multi-statement transactions. I'll be honest that ACID here is usually per table / per snapshot."

R — Requirements​

TypeRequirement
FRAppend / overwrite / MERGE; concurrent readers; time travel; schema evolution
NFRAtomic visibility of a commit; no torn reads; durable after successful commit
IsolationSnapshot isolation—readers pin a snapshot while writers advance the head
OpsCompaction, snapshot expiration, catalog HA; conflict retries on concurrent writes

"I'll ask: Iceberg, Delta, or Hudi? Single engine (Databricks) or multi-engine (Spark + Trino + Flink)? I'll assume S3 + Iceberg or Delta, multi-engine OK."

A — Assumptions (state aloud)​

AssumptionWhy it matters
Data files are immutable once writtenSimplifies isolation—never mutate in place
Catalog supports atomic CAS of the current snapshot pointerThis is the A in ACID
Writers retry on commit conflictOptimistic concurrency, not row locks
Single-table transactionsCross-table consistency is orchestration, not the format
Compaction is operationally mandatorySmall files kill query performance

"If they say 'S3 is transactional,' I'd correct: S3 is durable; the table format is transactional."

C — Capacity (back-of-envelope + metadata)​

Table size (say) → 50 TB Parquet on S3
Files per commit (naive) → hundreds of small files → metadata + planning blow up
Snapshots retained → N days for time travel; expire old metadata
Concurrent writers → 2–10 jobs; commit conflicts → retry rate matters
Catalog ops → every commit = metadata write + CAS; Hot partitions OK
Compaction SLO → rewrite small files → fewer manifests, faster scans
Reader pin duration → long Spark job holds snapshot; don't expire too aggressively

"Capacity failures in lakehouses are often metadata / small-file problems, not raw S3 GB."

T — Topology (draw this)​

Lakehouse layers providing ACID on object storage

Figure B: Engines → catalog (atomic snapshot pointer) → table-format metadata → immutable data files on object storage.

How each ACID letter maps (say this aloud):

LetterMechanism on object storage
AtomicityUpload data files first; then one CAS flips the snapshot pointer—all-or-nothing visibility
ConsistencySchema + partition constraints enforced in metadata before commit accepted
IsolationSnapshot isolation—readers see a committed snapshot; never in-flight file sets
DurabilityData objects + metadata objects durable on S3/ADLS; commit succeeds only after both

Atomic commit protocol with CAS on snapshot pointer

Figure C: Read snapshot → write immutable files → build new snapshot → CAS pointer; conflict → retry.

Commit protocol (whiteboard steps):

  1. Writer reads current snapshot from catalog.
  2. Writer uploads new immutable Parquet/ORC files (and delete files / position deletes as needed).
  3. Writer builds new snapshot metadata listing the full file set (or delta from parent).
  4. Writer CAS-updates the catalog pointer old → new.
  5. Success → all readers resolving "current" see the complete new snapshot.
  6. Conflict (another writer won) → abort, refresh metadata, retry (optimistic CC).

I — Invariants (safety)​

"Non-negotiable:

  1. Never expose partial writes—readers only follow committed snapshot IDs.
  2. Immutable data files—updates are new files + metadata, not rewrite-in-place of objects mid-read.
  3. CAS is the commit boundary—files without a winning snapshot are garbage (subject to cleanup).
  4. Time travel = old snapshots still referenced—don't expire while readers/jobs need them.
  5. Honest scope—this is table-level ACID, not a distributed XA across gold+silver."

C — Constraints (second C)​

ConstraintDesign response
No native multi-file S3 transactionTable format metadata + catalog CAS
Concurrent writersOptimistic commit + retry; or partition ownership
Small files / many manifestsCompaction / OPTIMIZE / rewrite_data_files
Cross-table consistencyOrchestrate job order (silver before gold); not format XA
Engine mixPrefer Iceberg for neutrality; Delta if Databricks-heavy
Deletes / GDPRMERGE + compaction; snapshot expiration policies

E — Evolution (ops + formats)​

Phased delivery:

PhaseDeliverable
M1Bronze table format on S3; single-writer append; catalog
M2Concurrent writers + conflict retry; snapshot history / time travel
M3Silver MERGE idempotent on business keys; schema evolution rules
M4Compaction + snapshot expiration SLOs; metrics on commit conflicts
M5Multi-engine readers (Trino); governance (row/column policies)

Failure modes I'd mention:

FailureMitigation
Two writers CAS conflictRetry with fresh snapshot; serialize hot partitions
Orphan files after failed commitGC / vacuum after retention
Metadata explosionCompaction; fewer files per commit
Reader sees "missing" after aggressive expireAlign snapshot retention with longest job
"Spark transactions" without table formatNot a lakehouse—add Iceberg/Delta/Hudi

Observability: commit success/conflict rate, files per snapshot, metadata size, compaction lag, query files scanned.


Closing line (interview)​

"So: S3 stores immutable files; the open table format stores snapshots/manifests; the catalog CAS atomically publishes a new snapshot. That gives atomic multi-file commits, snapshot isolation, and durable table state—ACID per table, without a warehouse server. Compaction and conflict retries are the operational price. If you need cross-table transactions or OLTP latency, that's a different system."

Scoring signals​

StrongWeak / red flag
Separates S3 durability from table-format ACID"Parquet on S3 is ACID"
Describes upload-then-CAS commit"Spark supports transactions" with no metadata story
Snapshot isolation for readersClaims serializable cross-table XA
Concurrent writer = conflict + retryIgnores concurrent writes
Compaction / small filesNever mentions ops cost
Names Iceberg/Delta/HudiVague "lakehouse product"

Compact outline (if time-boxed to 2 minutes)​

"Object storage ≠ multi-file atomicity. Iceberg/Delta/Hudi: write immutable Parquet, then CAS catalog snapshot pointer. Readers pin one snapshot—no torn reads. Concurrent writers: optimistic CC, loser retries. ACID is table-level snapshot isolation + durable objects. Compaction required. Not cross-table XA, not OLTP."

24. Weak Answer Example​

Question: "How does a lakehouse provide ACID on object storage?"

"We store Parquet on S3 and use Spark, so we have a lakehouse with ACID because Spark supports transactions."

Why weak / red flags: No open table format, no metadata/CAS commit story, ignores concurrent writers and small files—Parquet-on-S3 alone is not a lakehouse.

25. Hands-On Exercise​

  1. Create local MinIO or cloud bucket; write Iceberg or Delta table with Spark.
  2. Run two concurrent append jobs; observe commit conflict behavior.
  3. Query history or snapshots; run time-travel SELECT.
  4. Generate small files; run compaction; compare query plan file counts.
  5. Sketch medallion DAG for a sample ecommerce dataset.

26. Knowledge Check​

  1. Atomic commit mechanism? (Metadata CAS / snapshot swap.)
  2. Medallion middle layer? (Silver—cleaned/conformed.)
  3. Reader isolation model? (Snapshot isolation.)
  4. Small file problem cause? (High-frequency small writes.)
  5. Open formats named? (Iceberg, Delta, Hudi.)
  6. Bronze layer purpose? (Raw ingest preservation.)
  7. Time travel enables? (Audit and rollback.)
  8. MERGE use case? (Upserts and deduplication.)
  9. Catalog role? (Table metadata resolution.)
  10. Lakehouse weak for? (OLTP low-latency writes.)

27. Flashcards​

FrontBack
LakehouseLake storage + warehouse semantics via table formats
Open table formatMetadata spec for ACID on object files
MedallionBronze → silver → gold layering
SnapshotPoint-in-time consistent table view
CompactionMerge small files for scan efficiency
CAS commitCompare-and-swap metadata for atomicity
IcebergNetflix-originated open table format
Delta LakeDatabricks-originated table format
Time travelQuery historical snapshots
Partition pruningSkip files via partition metadata

28. Cheat Sheet​

LAKEHOUSE STACK
Engines (Spark/Flink/Trino) → Table format → Parquet on object storage

ACID ON S3
Write files → CAS metadata snapshot → readers pin version

MEDALLION
Bronze: raw | Silver: clean | Gold: curated

OPS MUST-HAVES
Compaction, snapshot expiry, orphan cleanup, commit retry

WHEN NOT
OLTP, tiny data, no ops maturity

PRINCIPAL ANCHORS
Format choice = engine + catalog lock-in
Compaction is production SLO work
Medallion contracts between layers
Governance enforces across engines
Time travel ≠ free storage
Commit conflicts are normal at scale
FinOps: gold smaller than bronze
Hybrid warehouse+lake common at enterprise scale

30. References​

Primary sources​

  • Armbrust, M., et al. (2021). Lakehouse: A New Generation of Open Platforms that Unify Data Warehousing and Advanced Analytics. CIDR.
  • Apache Iceberg, Delta Lake, Apache Hudi official documentation — format semantics and guarantees.
  • Databricks Lakehouse documentation — medallion and Delta implementation choices.
  • Netflix Iceberg engineering blogs — production scale lessons.

Distinction​

Claim typeSource
Snapshot isolation semanticsFormat specifications
Medallion patternDatabricks/industry practice—organizational convention
Performance numbersWorkload-specific; do not generalize