Module 07 • Next-Gen Storage Architecture

07. Data Lakehouse Architecture & Open Table Formats

The Data Lakehouse combines the cheap, open, multi-petabyte storage capacity of a Data Lake (S3, ADLS, GCS) with the ACID transactional reliability, schema enforcement, and lightning-fast BI query performance of a Data Warehouse.

Instructor Insight (© Venkata Bhattaram): "For 15 years, data teams were trapped in an expensive compromise: store cheap raw files in a chaotic 'Data Swamp' where partial writes corrupt entire directories, OR pay millions to lock proprietary data inside an isolated Data Warehouse. The Data Lakehouse solves this once and for all: your data stays in open Parquet files on cloud storage, but an open metadata transaction log provides complete ACID guarantees, instant rollback, and concurrent reads and writes."
The Public Parking Lot vs. The Smart Valet Analogy
• Traditional Data Lake (Public Lot): Anyone can park or drive in. If a driver stalls halfway in, the entrance is blocked, cars double-park, and nobody knows where any car is parked without walking the entire lot.
• Data Lakehouse (Smart Valet with Digital Ledger): Cars still park in the same open lot (cheap cloud storage), but a computerized master ledger (the transaction log) tracks every space in real time. If a parking attempt fails, the valet rolls it back instantly so the lot remains immaculate.
The Evolution

The 2-Tier Architecture vs. The Unified Lakehouse

Before Lakehouses, organizations had to maintain two completely separate copies of their data: a Data Lake for raw ingestion and machine learning, and a Data Warehouse for business intelligence.

Capability Traditional Data Lake Traditional Data Warehouse Modern Data Lakehouse
Storage Format Raw open files (CSV, JSON, Parquet) on S3/Blob. Proprietary closed storage format. Open Parquet files + Open metadata log.
ACID Transactions No (Risk of dirty reads & partial writes). Yes (Full ACID compliance). Yes (Full ACID via metadata manifests).
Cost per Terabyte Very Low ($23/TB/month on S3). High to Extreme ($$$ proprietary compute/storage). Very Low (Commodity cloud object storage).
Workload Support Big Data, AI, ML, Spark, Unstructured data. BI dashboards, SQL reporting only. Unified: BI, SQL, AI, Machine Learning, Streaming.
Data Redundancy Requires manual ETL pipelines into DWH. Duplicate copy of lake data (stale, expensive). Zero Duplication: Single source of truth.
Under The Hood

The Secret Sauce: How Open Table Formats Work

An Open Table Format is not a new file type. It is an intelligent abstraction layer that turns a folder of independent Parquet files into a single, cohesive, transactional database table.

// Physical Layout on S3 / ADLS / GCS:
s3://corporate-lakehouse/sales_orders/
└── _delta_log/ ← Transaction Log Directory (The Brain)
│   └── 00000000000000000000.json (Commit 0: Created table, added files A, B)
│   └── 00000000000000000001.json (Commit 1: Appended file C)
│   └── 00000000000000000002.json (Commit 2: GDPR Delete: marked file A invalid, added file D)
│   └── 00000000000000000010.checkpoint.parquet (Checkpoint: consolidated state)
└── part-0000-fileA.parquet ← Historical / Tombstone file
└── part-0001-fileB.parquet ← Active Valid Parquet Data File
└── part-0002-fileC.parquet ← Active Valid Parquet Data File
└── part-0003-fileD.parquet ← Active Valid Parquet Data File
How a Read Query Executes: When you run SELECT * FROM sales_orders, the engine does NOT scan the folder blindly. It reads the latest JSON commit log, discovers that fileA.parquet was marked as deleted in Commit 2, and reads ONLY files B, C, and D!
Industry Standards

The Big Three: Delta Lake vs. Apache Iceberg vs. Apache Hudi

Three open-source formats dominate the modern data engineering world. While they share core principles, each was designed for specific operational strengths.

Delta Lake

Created by Databricks, donated to the Linux Foundation. Backed by an ordered JSON transaction log directory (_delta_log/).

  • Native In: Databricks, Spark, Microsoft Fabric.
  • Key Feature: Liquid Clustering & Z-Order clustering.
  • Best For: Spark-heavy ecosystems and Databricks platform users.
Ordered Commit Log

Apache Iceberg

Created by Netflix and Apple. Uses a hierarchical tree of Snapshot → Manifest Lists → Manifest Files.

  • Native In: Snowflake, Trino, Dremio, AWS Athena/Glue.
  • Key Feature: Hidden Partitioning (no user query rewrite required).
  • Best For: Multi-engine flexibility and cross-cloud analytics.
Hierarchical Manifest Tree

Apache Hudi

Created by Uber for high-frequency rideshare updates. Built for low-latency streaming ingest and record-level CDC upserts.

  • Native In: AWS EMR, Spark, Flink streaming.
  • Key Feature: Merge-on-Read (MoR) and Copy-on-Write (CoW).
  • Best For: High-frequency real-time record updates & CDC.
Streaming UPSERT & CDC
Enterprise Capabilities

The Four Superpowers of Lakehouse Tables

Open table formats provide enterprise data guarantees that were impossible in legacy Hadoop or raw S3 data lakes.

1. Time Travel & Auditing

Because every commit generates an immutable snapshot, you can query data exactly as it existed at any previous timestamp or version.

SELECT * FROM orders VERSION AS OF 12;
RESTORE TABLE orders TO VERSION AS OF 11;

2. Schema Enforcement & Evolution

Prevents bad data from poisoning your tables. Writes with missing or invalid columns fail safely unless explicit evolution is granted.

df.write.format("delta")
  .option("mergeSchema", "true")
  .mode("append").save(path)

3. In-Place SQL MERGE & Deletes

Full support for standard SQL MERGE INTO for Change Data Capture (CDC) and DELETE WHERE for GDPR compliance.

MERGE INTO target t USING source s
ON t.id = s.id
WHEN MATCHED THEN UPDATE SET *
WHEN NOT MATCHED THEN INSERT *;

4. Auto-Compaction & Z-Ordering

Solves the "Small File Problem" by compacting thousands of 2MB streaming files into optimized 128MB Parquet files without stopping reads.

OPTIMIZE orders
ZORDER BY (customer_id, order_date);
Interactive 2D Lab

Lakehouse Time Travel & ACID Transaction Simulator

Execute transactional commits below. Watch how the underlying transaction log creates immutable commits, creates and invalidates Parquet data files, and allows zero-downtime historical Time Travel queries!

Transaction Log: _delta_log/*.json VERSION 0
S3 / Blob Parquet Files 2 Active Files
Query Engine View (Time Travel SQL Execution) SELECT * FROM customer_orders;
order_id customer_id amount_usd status