Module 26 of 52 · Engineering and platforms

Platforms and the lakehouse

30 min 3 outcomes Interactive + terminal 6 references

By the end of this module you will be able to:

  • Explain MapReduce and the shared-nothing architecture that enables petabyte-scale processing
  • Compare Snowflake, BigQuery, and Databricks as cloud data platform choices
  • Explain the open table formats Delta Lake and Apache Iceberg and their role in the data lakehouse pattern

The lakehouse stack turns on who controls the catalogue layer

A query descends from engine to catalogue to table format to bytes, and the engines are the layer that swaps out easily, so whoever holds the catalogue holds the permissions, the cost and the lock-in.

A lakehouse query descends four layers: the engine asks the catalogue, the catalogue names the table, the open table format finds the files, and object storage returns the bytes. The engines are the easy layer to swap, which is why the catalogue is the layer that is fought over.

The lakehouse stack turns on who controls the catalogue layer Four bands stacked in the order a query travels. Top, Query and processing engines, Layer 4: SQL warehouses, batch jobs and stream jobs. Next, tinted red with a rule along its top, The contested layer, Layer 3: it names tables, holds permissions and tracks snapshots, and carries four neutral chips reading Hive Metastore, AWS Glue, Unity Catalog and Apache Polaris. It stops short to leave room for a note. Then Open table format, Layer 2, and Object storage, Layer 1. Three red arrows descend the centre, labelled a query asks the catalogue, the catalogue names the table, then the format finds the files. The note beside the catalogue says whoever holds it holds governance, cost and lock-in. The lakehouse stack: a query descends from engine to files Query and processing enginesSQL warehouses, batch jobs and stream jobs, side by sideLayer 4, engines The contested layerNames tables, holds permissions, tracks snapshotsLayer 3, catalogue Open table formatApache Iceberg, Delta Lake and Apache Hudi: metadata that turns files into a tableLayer 2, open table format Object storageCheap durable buckets. It keeps the bytes and nothing else.Layer 1, object storage a query asks the catalogue the catalogue names the table the format finds the files Hive Metastore AWS Glue Unity Catalog Apache Polaris Side noteWhoever holds the catalogueholds governance, cost andlock-in.

Capability belongs to the table format version, not the format name

Iceberg carries deletion vectors, row lineage and the variant type at version 3 and none of them at version 2, and Delta Lake exposes the same ground only as features somebody has enabled, so a promise made on the format name can land on a table that cannot keep it.

Capability belongs to the table format version, not to the format name. Iceberg carries deletion vectors, row lineage and the variant type at spec version 3; Delta Lake exposes the same ground through table features you have to enable, so read the version and the enabled features before promising a workload anything.

Capability belongs to the table format version, not the format name A capability matrix in three regions. The head row names five capability columns: ACID commits, schema evolution, deletion vectors, row lineage, variant type, with the corner cell reading Format. Three rows follow. Iceberg v2 reads Yes, Yes, No, No, No. Iceberg v3 reads Yes across all five. Delta Lake reads Yes, Yes, Opt-in, Opt-in, Opt-in. Each cell is tinted on one red ladder: the deeper tint for Yes, the pale tint for Opt-in, grey for No. Under the matrix, three swatches in those same three tints caption the ladder: in the format version, enable the feature, not at this version. A filled red band closes the figure by contrasting a versioned spec with enabled table features. Five capabilities, read against Iceberg v2, Iceberg v3 and Delta Lake FormatACIDcommitsSchemaevolutionDeletionvectorsRowlineageVarianttype Iceberg v2YesYesNoNoNo Iceberg v3YesYesYesYesYes Delta LakeYesYesOpt-inOpt-inOpt-in Yes: in the format versionOpt-in: enable the featureNo: not at this version Iceberg versions the spec; Delta enables table featuresRead the version and the enabled features before you promise a workload anything.

Lakehouse: open-table format adds transactions to data lake

Object storage keeps the bytes and nothing else, so the open table format is the layer that turns files into a table: without it there is no schema evolution, no time travel, and concurrent writes conflict.

Lakehouse is the architecture that gives lake-scale storage warehouse-grade transactions: open table formats (Iceberg, Delta) plus the medallion promotion gates. Without the open table format you have a data lake; with it, you have a lakehouse. Databricks coined the term; Apache Iceberg made the storage layer vendor-neutral.

Lakehouse adds open-table transactions to medallion storage A stack of four full-width layers, read from the files up. At the bottom, Object storage holds Parquet files, cheap and elastic, on S3 or Azure. Managed by it, and emphasised in red soft with a red left bar, sits Open table format: Iceberg or Delta Lake. Promoted via that format, the Medallion promotion layer carries three chips, Bronze then Silver then Gold, joined by red promotion arrows. Queried by the top layer, Query engine names Trino, Spark and DuckDB. The author's three verbs sit on white knockouts in the gaps between the layers they join. A filled red band closes with what is missing when the table format is. Lakehouse gives lake-scale storage warehouse-grade transactions Query engineTrino, Spark, DuckDBTrino + Spark Medallion promotionBronzeSilverGoldDatabricks Open table formatIceberg or Delta LakeApache Iceberg Object storageParquet files, cheap and elasticS3 / Azure queried bypromoted viamanaged by Without the open table format you have a data lakeFiles on object storage without table format support produce write conflicts, partial reads, no schema evolution, and no timetravel. The open table format is the transactions layer.

Medallion architecture promotion gates between layers

Medallion architecture moves data Bronze to Silver to Gold, raw payload to cleaned schema-enforced rows to business-ready aggregates, and the promotion gate between each pair is the quality control, so wherever a gate is skipped the layer below leaks its defects upward.

Medallion architecture moves data through Bronze (raw, immutable), Silver (cleaned, deduplicated, schema-enforced), and Gold (business-ready, aggregated). The promotion gate between each layer is a named quality check; without it, the layers collapse into one bag of files. Databricks documents the same shape.

Medallion architecture moves data Bronze to Silver to Gold Three layer cards run left to right along a red path: Bronze, raw and immutable with no validation; Silver, cleaned, deduplicated and schema-enforced, emphasised in pale red with a red border; Gold, business-ready aggregates. Each is attributed to Databricks. The path does not run straight through. A solid red bar stands in each of the two gutters, so data can only pass a layer boundary through a gate. A dashed grey tie, not an arrow, drops from each bar to a card naming what that gate checks: Bronze to Silver runs cleansing and schema checks, Silver to Gold runs aggregation logic against the business contract. A red band closes the figure with the cost of skipping a gate. Three layers, and the promotion gate that stands between each pair1Bronze layerRaw + immutable, no validationDatabricks2Silver layerCleaned, deduplicated,schema-enforcedDatabricks3Gold layerBusiness-ready aggregatesDatabricksPromotion gateBronze -> SilverRuns cleansing and schema checksPromotion gateSilver -> GoldRuns aggregation logic against thebusiness contractPromotion gates are the quality controlSkip a gate and the layer below leaks defects up.

Google MapReduce: processing the entire web with commodity hardware

In 2004, Google engineers Jeff Dean and Sanjay Ghemawat published "MapReduce: Simplified Data Processing on Large Clusters." The paper described a programming model that decomposed large computation tasks into two phases: a Map phase that processes each input record independently and emits key-value pairs, and a Reduce phase that aggregates all values for each unique key.

The insight was that most large-scale data transformations could be expressed in this pattern, and that pattern was trivially parallelisable. Counting word frequencies across a billion documents: each Map function processes one document and emits (word, 1) pairs; each Reduce function sums the counts for one word. With 10,000 machines, the job runs in minutes instead of months.

MapReduce became the foundation of Hadoop, which became the foundation of the entire big data ecosystem. Although the original MapReduce framework has largely been replaced by Apache Spark and cloud-native query engines, the shared-nothing, partition-parallel architecture it introduced is still the underlying model of every major data platform today.

Google needed to index billions of web pages. A single powerful machine could not hold the web. MapReduce split the problem into independent units that could run in parallel on thousands of commodity machines. What fundamental insight does this encode about large-scale data processing?

Large-scale data platforms work by moving computation to partitions, then paying carefully for the few moments when data must cross the network.

24.1 Shared-nothing architecture and Apache Spark

Shared-nothing architecture distributes data and computation across nodes that do not share memory or storage. Each node processes its local partition independently, communicating only to shuffle data between partitions (for joins and aggregations). Scan-heavy work scales close to linearly: doubling the nodes roughly doubles scan throughput, because each additional node handles an additional partition. Joins and aggregations that shuffle data across the network, and skewed keys that pile work onto one node, scale less well.

Apache Spark replaced Hadoop MapReduce by keeping intermediate results in memory (RAM) rather than writing them to disk between each computation step. For iterative algorithms like machine learning training, where the same data is processed many times, this in-memory execution made such jobs up to 20x faster than Hadoop MapReduce in the original RDD paper's tests. Spark introduced resilient distributed datasets (RDDs) and later DataFrames and Datasets, which provide a columnar, SQL-friendly API while retaining the underlying parallel execution model.

Spark's lazy evaluation model builds a directed acyclic graph (DAG) of transformations before executing any computation. When an action (such as count or write) is triggered, the Catalyst optimiser rewrites the DAG to eliminate redundant steps, push filters as early as possible, and select efficient physical execution plans. This query optimisation is why writing idiomatic Spark code (using the DataFrame API, not RDDs) consistently outperforms manually optimised lower-level code.

The same partitioned execution idea appears in modern cloud platforms, but each product exposes a different operating model for cost, governance, and workload isolation.

In the paper's evaluation, Spark ran iterative applications up to 20x faster than Hadoop and sped up a real-world data analytics report by 40x. Keeping working data in memory is what makes iterative algorithms practical at this scale.
Paraphrased from Matei Zaharia et al., 'Resilient Distributed Datasets: A Fault-Tolerant Abstraction for In-Memory Cluster Computing', NSDI (2012)

The performance advantage of in-memory execution is not just about speed: it makes entire categories of algorithm (iterative ML training, graph algorithms, interactive analytics) practical at scale. Hadoop MapReduce made batch analytics possible at petabyte scale; Spark made interactive and iterative analytics practical at the same scale.

Loading interactive component...

24.2 Cloud data platforms: Snowflake, BigQuery, and Databricks

Snowflake uses a hybrid of shared-disk and shared-nothing ideas. Persisted data sits in a central repository accessible by compute clusters, while query processing runs on massively parallel compute clusters. Virtual warehouses can be sized and paused independently, which makes workload isolation and cost control board-level design decisions rather than database administrator tuning details.

Google BigQuery is a serverless analytical warehouse: users submit SQL queries without managing clusters. Its operating discipline is different from Snowflake because query cost and performance are strongly shaped by bytes scanned, partitioning, clustering, slot reservations, and governance of who can launch expensive queries.

Databricks builds around Apache Spark, Delta Lake, notebooks, jobs, SQL, and ML tooling. Its strength is mixed workload development: the same platform can ingest events, transform lake data, train models, serve features, and expose SQL analytics. The leadership trade-off is integration versus dependency: one platform can reduce hand-offs, but it also concentrates governance, skills, and commercial risk.

Common misconception

“Cloud data warehouses like Snowflake and BigQuery are just hosted databases and offer no architectural advantages over on-premise SQL servers.”

Cloud warehouses differ architecturally from traditional row-store systems in several critical ways: compute and storage can scale separately, analytical storage is column-oriented, execution is massively parallel, and serverless or elastic compute reduces idle capacity. That does not make them automatically cheaper or faster. Poor partitioning, uncontrolled scans, and weak access governance can make a cloud warehouse expensive quickly.

The lakehouse pattern exists because teams wanted open object storage economics without giving up transactional table behaviour.

24.3 Choosing between warehouse and lakehouse patterns

A simple decision test keeps platform selection honest. If the workload is governed SQL analytics with many independent business users, start with a warehouse pattern. If the workload mixes engineering, streaming, ML, and feature pipelines, start with a lakehouse pattern. If sub-second operational decisions are required, keep a serving store or stream processor in the design rather than forcing every decision through the analytical warehouse.

Data lakes (raw files in object storage, schema-on-read) offered cheap scalable storage but no ACID guarantees, no schema enforcement, and poor query performance on small files. Data warehouses offered ACID and performance but were expensive and required schema-on-write. The lakehouse pattern combines cheap open-format storage with warehouse-quality reliability by adding a transactional metadata layer over the data lake.

Picking the lakehouse pattern only pays off if the transactional metadata layer underneath the files is real, which is the work Delta Lake and Apache Iceberg do.

24.4 Delta Lake, Iceberg and the table contracts they demand

Delta Lake (Databricks, open-sourced 2019) adds a transaction log to Parquet files stored in object storage. Every write creates a new log entry describing the files added or removed. This provides ACID transactions (readers never see partial writes), time travel (querying the table as it was at an earlier version or timestamp, by default up to 30 days back, or 7 days back once VACUUM has run with its default retention), schema evolution (adding columns without rewriting history), and efficient upserts and deletes. Delta Lake is the foundation of the Databricks Lakehouse Platform.

Apache Iceberg (created at Netflix and now an Apache project) solves the same class of problems with a snapshot and manifest architecture rather than a single sequential log. Iceberg's hidden partitioning allows queries to prune data without requiring users to know the partition layout. Its main strategic value is engine neutrality: Spark, Flink, Trino, Presto, Hive, and Impala can safely work with the same tables.

The architectural distinction is important for executives as well as engineers. A lakehouse is not just a new name for a data lake. It is a commitment to table-level contracts: schema change rules, ACID writes, retention and vacuum rules, lineage, access control, compaction, snapshot retention, and recovery. Without those controls, the organisation still has cheap files, not trusted analytical tables.

24.5 Check your understanding

A data engineering team runs a nightly Spark job that reads 2TB of raw events, applies 12 sequential transformations, and writes aggregated results to a data warehouse. The job takes 4 hours and the team needs to reduce it to under 30 minutes. Which architectural change offers the most use?

A team using a data lake (CSV files in S3) discovers that a pipeline bug wrote incorrect customer records last Tuesday. They need to: (1) view the table as it was before the bad write, and (2) restore the correct state. Which table format supports this without manual backup restoration?

A BigQuery table contains 10 years of web clickstream data, or 5 TB in total. Assume the project has already used its first 1 TiB monthly free allowance and pays $6.25 per TiB for on-demand analysis. Every query scans the full table and costs about $28 per run, although only 50 GB of recent data is relevant. What is the most effective fix?

Loading interactive component...

Core checks before moving on

  • Shared-nothing architecture distributes data and computation across independent partitions; shuffles are the expensive moments to design around.
  • Spark made iterative and interactive large-scale processing practical by using memory, DataFrames, and query optimisation rather than disk-heavy MapReduce stages.
  • Snowflake, BigQuery, and Databricks differ most in operating model: warehouse isolation, serverless scan economics, and integrated lakehouse development.
  • Delta Lake and Apache Iceberg add table reliability to object storage through transaction metadata, snapshots, schema evolution, and recovery features.
  • Platform strategy fails when cost, ownership, access control, and recovery rules are treated as operations details rather than design constraints.

Standards and sources cited in this module

  1. Jeff Dean and Sanjay Ghemawat, 'MapReduce: Simplified Data Processing on Large Clusters', OSDI (2004)

    The founding paper for distributed data processing. Introduced the Map/Reduce programming model that underpins all subsequent big data frameworks.

  2. Matei Zaharia et al., 'Resilient Distributed Datasets: A Fault-Tolerant Abstraction for In-Memory Cluster Computing', NSDI (2012)

    The Spark paper introducing RDDs and in-memory distributed computation. Its abstract reports Spark up to 20x faster than Hadoop for iterative applications and 40x faster on one real analytics report.

  3. Delta Lake documentation: ACID transactions and time travel

    Reference for Delta Lake's transaction log, time travel queries, schema evolution, and RESTORE TABLE commands.

  4. Apache Iceberg documentation

    Reference for Iceberg's snapshot model, hidden partitioning, and engine-agnostic open table format specification.

  5. Snowflake documentation: key concepts and architecture

    Official source for Snowflake's hybrid shared-disk and shared-nothing architecture and managed cloud operating model.

  6. Google BigQuery documentation: introduction to BigQuery

    Official source for BigQuery's serverless analytics model, storage, compute, and SQL execution concepts.

Module 26 of 52 · Engineering and platforms