Data Lakehouse

Context: FIT3003_MOC · data-lake storage plus warehouse-style managed tables · the cloud successor to the unit’s Oracle “Model 3” pipeline (Data Engineering) · loaded by ELT · sibling of Cloud Data Warehousing · (W12 emerging-topics deck — not a book chapter) Parent Framework: Data Warehouse

Quick Revision

  • 🎯 Objective: combine cheap, any-format lake storage with warehouse table management ➔ one shared copy of the data serves SQL/BI and ML, with less duplication between workloads.
  • 📦 Core Components: lake = schema-on-read | warehouse = schema-on-write | layers Raw (Bronze) ➔ Cleaned (Silver) ➔ Facts & Dims (Gold) | open table formats (Parquet · Iceberg · Delta).
  • ⚡ Key Constraint: same star schema, different engine — facts, dimensions, SCD, slicing and aggregation (Ch 2–18) carry over unchanged; only storage, compute and tooling change. A lake still needs metadata, security, quality controls and lifecycle management, or it cannot be trusted.

📝 How It Works

1. Warehouse vs lake

AspectData warehouse (schema-on-write)Data lake (schema-on-read)
Holdscurated, structured analytical datadata in original or transformed form
Data typesstructuredstructured, semi-structured, unstructured
Structuredefined schemas, controlled transformationsstructure applied when read
Storagewarehouse enginelow-cost cloud object storage
ServesSQL, reporting, BI, governed business metricsexploration, large-scale processing, ML

2. The lakehouse pipeline

  • Five steps ➔ ① sources produce operational and analytical data ② raw data lands in a cloud data lake ③ pipelines clean and transform ④ managed tables expose curated datasets ⑤ SQL engines, BI tools and ML consume them.
  • Ingestion ➔ Kafka — real-time event bus, Spark streams it into Raw · Fivetran — scheduled pulls from DBs and SaaS · Auto Loader — picks up new files in storage.
  • Storage compute ➔ S3 / ADLS: cheap storage, slow per file but fast in parallel · Spark: the compute that reads it in parallel (Hadoop and Spark) · Delta: the table format that adds ACID (ACID Properties).
  • Platforms ➔ Databricks on AWS, Azure or GCP · AWS = S3 Glue Athena · Azure = ADLS Fabric · ⛔ not DynamoDB — that is an operational DB (NoSQL Databases).

3. Open table formats — four layers

LayerDefinesExample
File formathow data is represented in filesApache Parquet (columnar)
Table formathow files metadata form one logical tableApache Iceberg · Delta Lake
Catalogwhere tables are registered and discovered—
Query engineexecutes SQL or other analyticsApache Spark
  • Benefits ➔ many tools read the same tables · schema evolution and table snapshots (implementation-dependent) · interoperability.
  • Challenge ➔ compatibility, governance and operational integration still need careful design.

4. Shared dimensions, streaming facts

  • Conformed dimensions ➔ (TotalSales, updated every minute) and (StockLevel, loaded nightly) join the same Time, Product and Store dimensions ➔ Multi-Fact Star Schemas.
  • Different clocks ➔ dimensions are shared and change slowly (SCD); the fact is fluid, refreshed by the stream.
Micro-batchEventFact row (Store 3, Product 17, today)
10:00key unseen ➔ NOT MATCHED ➔ insertTotalSales = \120$
10:01key exists ➔ MATCHED ➔ add\185$
10:02MATCHED ➔ add\240$

🗺️ Layer & Dataflow

Model 3 (Oracle, on-prem)Lakehouse blockDatabricks nameWhat happens
sources (public · 3rd party · producers)sources app events, IoT, SaaS APIs—same producers, more of them
Temp DB (staging)RawBronzeas landed, append-only, load time and source file (raw JSON of every lab login)
ETL (PL/SQL scripts) — in progressCleanedSilvertyped, de-duplicated, conflicts resolved (one valid row per login, known StudentID)
Data warehouse (star schema)Facts & DimsGoldstar built by ETL from cleaned tables (lab_fact: NumOfLogins by semester, period, degree)
OLAP / BI (reports, cubes)SQL warehouse / BI—compute serving SQL to Power BI or Tableau (Databricks SQL, Snowflake, Athena)
flowchart LR
  S[Sources<br/>DBs · APIs · events · files] --> I[Ingestion<br/>Kafka · Fivetran · Auto Loader]
  subgraph L[Storage S3/ADLS · Delta · compute Spark]
    B[Raw / Bronze] --> SV[Cleaned / Silver] --> G[Facts & Dims / Gold]
  end
  I --> B
  G --> Q[SQL warehouse / BI · ML]

⚠️ Common Mistakes

  • 💡 “A lake needs no governance” ➔ the deck’s warning: without metadata, security, quality and lifecycle controls the lake cannot be trusted ➔ Data Management and Data Governance.
  • 💡 Thinking the lakehouse replaces dimensional modelling ➔ Gold is a star schema; the design decisions of the unit are unchanged.

🧠 Active Recall