Module 04 • Scheduled Data Pipelines

04. Batch Loading, ETL vs. ELT & Orchestration

Not all data needs to arrive in sub-seconds. 90% of the enterprise world runs on scheduled batch processing—accumulating data over hours or days and processing massive chunks reliably in parallel.

Instructor Insight (© Venkata Bhattaram): "Think of Batch Processing like a dishwasher. You don't run the dishwasher every time you use one single spoon! You pile plates and bowls throughout the day, and at midnight, you run the heavy cycle once when electricity is cheap. Batch loading processes millions of records overnight so business executives have fresh dashboards when they open their laptops at 8:00 AM."
The Scheduled Freight Train Analogy
Instead of sending 10,000 individual couriers on bicycles every minute (Streaming), a freight train arrives once every night at 2:00 AM, loads all 100 shipping containers at once, and transports them across the country at maximum efficiency.
Architectural Shift

ETL (Old Way) vs. ELT (Modern Cloud Way)

How cloud compute and modern warehouses changed the fundamental sequence of data engineering pipelines.

Traditional (1990s - 2015)

ETL: Extract → Transform → Load

Data is extracted from source databases, transformed and cleaned on an external middleware server (Informatica, Talend), and only clean data is loaded into the warehouse.

Why it existed: Legacy warehouses had expensive, limited compute. You couldn't afford to waste warehouse CPU cycles on raw data transformations!
Modern Cloud (2015 - Present)

ELT: Extract → Load → Transform

Raw data is extracted and dumped directly into the cloud warehouse or lake first. Transformations are then performed inside the warehouse using SQL tools like dbt!

Why it dominates today: Cloud engines like Snowflake and BigQuery scale up 128 compute nodes in 2 seconds. Raw data is always preserved, and transformations can be rewritten anytime!
Pipeline Golden Rules

Idempotency • Backfilling • Data SLAs

The two non-negotiable rules of professional Data Engineering: your pipeline must be safely rerunnable, and historical data must be reprocessable.

Golden Rule #1

Idempotency (Safe to Re-Run)

An idempotent pipeline guarantees that if you run it once, twice, or 100 times for the date 2026-10-10, the final table contains the exact same records with zero duplicate rows.

How to achieve: Use atomic partition overwrites: INSERT OVERWRITE ... WHERE date = '2026-10-10' instead of blind appends.
Golden Rule #2

Backfilling (Time Travel Repairs)

Suppose your team discovers a bug in how tax was calculated over the past 2 years. Backfilling is the automated process of re-running the pipeline over 730 historical daily batches without breaking downstream reports.

Tooling: Apache Airflow lets you trigger backfill runs across date ranges via CLI: airflow dags backfill -s 2024-01-01 -e 2026-10-10 my_dag.
The Air Traffic Controller

Orchestration & Directed Acyclic Graphs (DAGs)

How tools like Apache Airflow, Prefect, and Dagster ensure that step B runs only after step A succeeds.

What is a DAG (Directed Acyclic Graph)?
• Directed: Tasks move in one direction: Extract → Transform → Load.
• Acyclic: No infinite loops! Task C cannot loop back to trigger Task A.
• Graph: A network of dependencies. For example: Load Warehouse waits until BOTH Ingest Sales and Ingest Inventory finish successfully.
Interactive Execution Lab

Interactive Airflow DAG Execution Simulator

Click to trigger the daily batch pipeline and watch tasks transition from Queued to Running to Success!

Task 1
extract_orders
State: Idle
Task 2
validate_schema
State: Idle
Task 3
transform_spark
State: Idle
Task 4
load_warehouse
State: Idle
[Airflow Scheduler] DAG 'daily_sales_pipeline_v2' ready. Trigger schedule: 0 0 * * * (Midnight UTC).