Module 03 • Massive Unstructured Storage

03. Data Lake Explainer & Medallion Architecture

Traditional databases forced you to pre-define every single table column before you could save a single byte. A Data Lake inverted that model completely: store everything first, figure out structure later.

Instructor Insight (© Venkata Bhattaram): "Think of a Data Warehouse like an organized supermarket: every cereal box is labeled, inspected, and placed on an exact aisle shelf. If you bring a crate of live fish or raw oil, the manager turns you away. A Data Lake is the natural river and reservoir: you can dump water, ice, logs, and rain directly into it at virtually infinite scale and near-zero cost. When you need it, you filter it into drinking water."
The Raw Reservoir vs. Filtered Bottling Plant
Why did companies invent the Data Lake in the 2010s?
Because data became too big and diverse! Websites generate 50 million click logs per day, cars stream camera video, and servers spit out messy JSON. Buying expensive relational database licenses to hold raw debugging logs would bankrupt a company. A Data Lake allows you to dump raw logs directly onto cheap object storage (AWS S3) for pennies per gigabyte.
The Storage Foundation

Cloud Object Storage: S3 • ADLS Gen2 • GCS

Data lakes are not built on traditional hierarchical folders or local hard drives. They are built on distributed, highly available Cloud Object Storage.

Amazon Web Services

Amazon S3 (Simple Storage Service)

The grandfather of cloud storage. 99.999999999% (11 9's) durability. Globally distributed buckets with prefix partitioning.

Microsoft Azure

Azure Data Lake Storage (ADLS Gen2)

Built on Azure Blob storage with a true hierarchical namespace (POSIX directories) for blazing fast directory rename and delete operations in Spark.

Google Cloud Platform

Google Cloud Storage (GCS)

Global unified object storage with seamless integration into BigQuery external tables and Google Dataproc Spark clusters.

The Core Paradigm Shift

Schema-on-Write vs. Schema-on-Read

The fundamental architectural difference between traditional databases and modern data lakes.

Traditional Databases

Schema-on-Write (The Strict Bouncer)

The structure of the data must be declared before saving. If an incoming row contains an extra column or wrong datatype, the database rejects it with an error.

Trade-off: High data cleanliness, but very slow to adapt when business data structures change.
Data Lakes

Schema-on-Read (The Flexible Sorter)

Data is written raw as-is (JSON, CSV, Parquet) with zero gatekeeping. The schema is applied only when a query engine (like Spark or Presto) reads the file!

Trade-off: Massive intake speed and flexibility, but risks becoming a "Data Swamp" if left unmanaged!
Industry Standard Practice

The Medallion Architecture: Bronze • Silver • Gold

How modern data engineers prevent a Data Lake from turning into a chaotic Data Swamp.

Tier 1

Bronze (Raw Untouched)

The exact raw dump from external APIs, IoT devices, and CDC logs. Append-only, immutable history with ingestion timestamps.

Path: s3://lake/bronze/orders/
Tier 2

Silver (Cleaned & Enriched)

Duplicates removed, nulls handled, schema verified, datatypes cast properly, and customer records matched across systems.

Path: s3://lake/silver/orders/
Tier 3

Gold (Business Aggregated)

Curated dimensional tables, Star Schemas, and daily revenue aggregations ready for PowerBI, Tableau, and executive reports.

Path: s3://lake/gold/daily_sales/
Interactive Simulator

Interactive Medallion Data Refinery

Watch a raw, dirty user clickstream payload get transformed as it travels through Bronze, Silver, and Gold stages!

Performance Architecture

Data Lake Partitioning Strategies

If your data lake has 500 million files, your query engine cannot inspect all of them. Directory partitioning acts like labeled file folder dividers.

Prefix Partitioning Path: Avoiding Full Lake Scans
When storing web logs, arrange folders hierarchically by date and region:
s3://company-lake/silver/orders/year=2026/month=10/day=10/region=us-east/part-01.parquet

When an analyst runs: WHERE year=2026 AND month=10 AND day=10, the query engine skips 99.7% of the data lake and reads ONLY that single day's folder!