Chapter 4 of 12
Course Progress0 of 12 completed (0%)

Data Engineering · Chapter 4 · ~15 min · Intermediate

ETL vs. ELT: Modern Cloud Data Stacks

Understand why modern cloud architectures flipped ETL to ELT: extract raw data, load directly into columnar lakehouses, and transform in-warehouse using SQL and dbt instead of brittle compute servers.

  • Contrast legacy compute-bound ETL pipelines with scalable cloud ELT architectures
  • Understand raw data preservation in bronze/raw staging zones for lossless reprocessing
  • Analyze cloud warehouse cost and performance dynamics across BigQuery, Snowflake, and DuckDB
  • Build an idempotent ELT ingestion pipeline using Python and staging schemas

ETL vs. ELT: Modern Cloud Data Stacks: learn it visually

Understand why modern cloud architectures flipped ETL to ELT: extract raw data, load directly into columnar lakehouses, and transform in-warehouse using SQL and dbt instead of brittle compute servers.

ETL vs. ELT: Modern Cloud Data StacksUnderstand why modern cloud architectures flipped ETL to ELT: extract raw data, load directly into columnar lakehouses, and transform in-warehouse using SQL and dbt instead of brittle compute servers.UNDERSTANDETLFOLLOW THE FLOWELTAPPLY ITCloud Data StacksETL vs. ELT: Modern Cloud Data StacksUnderstand why modern cloud architectures flipped ETL to ELT: extract raw data, load directly into columnar lakehouses, and transform in-warehouse using SQL and dbt instead of brittle compute servers.UNDERSTANDETLFOLLOW THE FLOWELTAPPLY ITCloud Data Stacks

1The Historical Inversion: From Compute-Bound ETL to Scalable ELT

For three decades, data warehousing followed the strict ETL paradigm: Extract from transactional databases, Transform on dedicated middle-tier compute servers, and Load the cleaned, formatted data into the analytical warehouse.

Why was transformation placed before loading? Because in 1995, database storage was extraordinarily expensive ($10,000 per gigabyte), disk I/O was slow, and relational database management systems (RDBMS) could not scale horizontally. Loading unaggregated raw data directly into the database would have bankrupted the IT department and brought database CPUs to a crawl.

The Legacy Problem

In-Flight Transformation Bottlenecks

When business requirements changed or an extraction bug was discovered months later, data engineers had to beg source teams to re-export months of historical transaction dumps because the original raw payloads were discarded.

The Cloud Inversion

Decoupled Storage & Compute

Cloud object storage dropped to $0.02 per gigabyte per month. Modern MPP warehouses (Snowflake, BigQuery, Databricks) can spin up 1,000 CPU cores for 30 seconds to run massive parallel SQL transformations, making raw historical storage trivial.

Concept Check

What primary architectural evolution enabled the enterprise shift from legacy ETL to cloud ELT?

2Under the Hood: The Medallion Tiering Architecture

In modern ELT stacks, data moves through three structured zones known as the Medallion Architecture:

1. Bronze Layer (Raw Ingestion)

Append-only, untouched raw payloads. Webhook events and database CDC logs are dumped as compressed JSON or Parquet with ingestion timestamps (_ingested_at). No business rules or column filtering are applied here.

2. Silver Layer (Cleaned & Conformed)

Deduplicated, type-cast, and validated records. Schema contracts are enforced, timestamps normalized to UTC, and invalid foreign keys routed to quarantine tables.

3. Gold Layer (Business Marts)

Star-schema fact and dimension tables tailored for BI dashboards, executive reporting, and machine learning feature stores. Aggregations (e.g. Daily Active Users, Customer Lifetime Value) live here.

Wrong idea: Transform raw events in-flight before loading to database

Raw API → [Heavy Python Server] → Drops columns → Clean DBIrreversible data loss · Historical backfills impossible

Parsing, filtering, and dropping unmapped JSON fields on intermediate worker servers before loading. When business definitions change 6 months later, original raw values are lost forever.

Real system: Preserve raw historical payloads in Bronze staging first

Raw API → [Bronze: Raw Untouched JSON] → [SQL / dbt] → Gold MartsLossless audit trail · Infinite historical replayability

Loading untouched raw JSON payloads directly into scalable cloud object storage or Bronze tables. SQL models can replay and recompute metrics at any time.

Concept Check

Why should the Bronze layer of an ELT pipeline preserve the complete raw JSON or payload without dropping unparsed columns?

3Hands-On: Simulate Legacy ETL vs. Modern Cloud ELT

Compare how both architectures behave under heavy production traffic. Switch between modes and inject a 500k event spike to observe compute bottlenecks and recovery speed:

Modern ELT Architecture

Cloud Data Stack Pipeline Simulator

Observe how decoupling storage from compute transforms processing latency, server resilience, and historical backfills.

Sources
• Stripe Payments
• PostgreSQL App DB
• Web Clickstream
50,000 events/s
Ingestion Layer
Fivetran / Airbyte
Direct Cloud Extract
Zero compute parsing
Preserves raw JSON
Raw Load → S3
Storage & Warehouse
Medallion Storage
• Bronze (Raw JSON)
• Silver (Cleaned)
• Gold (Marts)
Decoupled MPP
Transformation
dbt + Snowflake / BQ
In-Warehouse SQL
Version-controlled DAGs
Ready for BI
Latency
2 min
Batch duration
Worker CPU Load
18%
Server strain
Est. Cost / Mo
$620
Compute + Storage
Historical Replay
100% Lossless
Full raw history
Concept Check

How does a production ELT loader guarantee idempotency during batch ingestion?

4Bug Hunt: Fix an Unsafe Ingestion Script

A junior engineer wrote an ingestion script that discards raw metadata, executes non-idempotent inserts, and loops row-by-row in Python. Fix the bugs to ensure raw preservation, set-based SQL loading, and idempotent UPSERT:

ELT Ingestion · Staging Preservation & Idempotent Loading
Python

🎯 Find and fix the bugs in the code above, then press Run & verify to test your solution.

Need a hint?
  • Keep raw payloads in the records array or load them into a bronze staging table.
  • Use ON CONFLICT (order_id) DO UPDATE or a staging table swap to guarantee idempotency on retry.
  • Eliminate df.iterrows() with a set-based SQL insertion or bulk execution.

5Recap

  • Legacy ETL transformed data in-flight on intermediate compute servers due to expensive database storage, resulting in dropped columns and brittle pipelines.
  • Modern ELT loads raw, untouched data directly into cloud object storage and MPP warehouses, offloading transformations to scalable SQL engines.
  • The Medallion Architecture organizes cloud lakehouses into Bronze (Raw Append-Only), Silver (Validated & Deduplicated), and Gold (Star Schema Marts).
  • Idempotency is mandatory: re-running batch loads must produce the exact same table state without creating duplicate records or inflating metrics.

Ready for Chapter 5? Mark this chapter as complete to proceed:

Enjoying this free lesson? Your support helps us build more free animated chapters.

Support Us