beginnerdata-warehousing

ETL Pipelines

Extract the data, clean it up, load it somewhere useful.

Key Points

What it is

ETL stands for Extract, Transform, Load. It's the process of pulling data from source systems, reshaping it into the format your warehouse needs, and loading it into the destination. It's the pipeline that keeps your analytical database current.

Why it exists

Your production database is designed for speed on individual transactions, not for running analytical queries across millions of rows. ETL moves data from where it's generated to where it can be analyzed without slowing down production systems or tangling analytical workloads with live traffic.

Intuition

Your app's database is like a restaurant kitchen — it's optimized for speed, high volume, and constant change. You wouldn't invite a researcher in there to run long queries during the dinner rush. Instead, at the end of the day you copy everything relevant into a separate room where they can analyze at leisure. That copying process is ETL. The separate room is your data warehouse.

How it works

  1. Extract

    Connect to source systems (Postgres, Salesforce, S3, APIs). Pull raw data as-is — no changes yet. Track what was already extracted to avoid duplicates on the next run.

  2. Transform

    Apply business logic: clean nulls, standardize formats, join tables, aggregate, deduplicate, rename columns. This is where data quality lives or dies.

  3. Load

    Write the clean data into the warehouse. Decide between append-only, upsert (update if exists, insert if not), or full replace depending on the use case.

  4. Schedule and monitor

    ETL usually runs on a schedule (hourly, daily). You need alerting when it fails and logging to debug what went wrong.

When to use

Common mistakes

Notes

In practice

Every analysis you do on a data warehouse assumes ETL already ran correctly. In practice, broken ETL pipelines are one of the top sources of wrong analytical results. Data scientists who understand ETL can debug data quality issues instead of just blaming the data.

Was this concept helpful?

Spot an error or gap? Suggest an edit →

Related concepts

star-and-snowflake-schemaolap-vs-oltpnormalization
Chirp at me!