ETL
Extract, Transform, Load: a pipeline that extracts data from sources, transforms it into the desired format, and loads it into a destination like a data warehouse.
What is ETL?
In short
ETL (Extract, Transform, Load) is a data pipeline pattern that pulls data out of source systems, reshapes and cleans it into a target format, and writes it into a destination such as a data warehouse. The defining feature is that transformation happens before the data lands, so what arrives in the warehouse is already cleaned, joined, and ready to query.
What ETL Actually Is
ETL stands for the three steps it runs in order. Extract reads raw records from sources like a Postgres production database, a Salesforce API, application log files, or a stream. Transform applies business rules: it cleans bad values, converts data types, deduplicates rows, joins tables, aggregates daily totals, and maps source columns to the warehouse schema. Load writes the finished result into the destination, usually a data warehouse such as Snowflake, BigQuery, or Redshift.
The point of ETL is to move data out of systems built for handling one transaction at a time and into a system built for analytics across millions of rows. A production database is tuned for fast single-row writes and reads. A warehouse is tuned for scanning huge tables to answer questions like revenue by region last quarter. ETL is the bridge between the two.
The word that matters most is the middle one. In classic ETL, transformation runs on a separate processing layer before the data ever reaches the warehouse, so only clean, structured data is loaded.
How It Works Under the Hood
A typical ETL job runs on a schedule, often nightly or hourly, orchestrated by a scheduler like Apache Airflow or Dagster. The extract step connects to each source and pulls either a full snapshot or, more commonly, only the rows that changed since the last run. That incremental pull uses a watermark column such as updated_at, or change data capture that reads the database write-ahead log so the source is never scanned in full.
The transform step is where most of the engineering lives. The pipeline parses raw records, drops malformed rows or routes them to a dead-letter location, standardizes formats like phone numbers and timestamps, looks up reference data, and computes derived fields. Tools range from hand-written Python or Spark jobs to managed services. Heavy transforms on big data sets typically run on a distributed engine like Apache Spark so the work splits across many machines.
The load step writes results in bulk. Warehouses are far faster loading a million rows in one batch than inserting them one at a time, so ETL almost always stages data in object storage like S3 first, then issues a bulk COPY into the warehouse. Loads are usually idempotent: each run can re-load the same partition safely using an upsert or a delete-then-insert by date, so a failed and retried job does not create duplicates.
When To Use It And The Trade-offs
Use ETL when the destination cannot store raw data cheaply, when you must mask or drop sensitive fields before they land for compliance reasons, or when the transformation logic is expensive and you want it computed once on a controlled cluster rather than inside the warehouse. It is the long-standing pattern for moving operational data into reporting systems.
The main alternative is ELT, which flips the last two steps: load raw data first, then transform inside the warehouse using SQL. Modern cloud warehouses are so fast and cheap that ELT has become the default for many teams, because raw data stays available for re-processing and analysts can rebuild transformations without re-extracting. ETL still wins when source-side compute is needed, when raw storage is a liability, or when the warehouse should not see unfiltered data.
The trade-offs of ETL are latency and rigidity. Batch ETL means analytics lag reality by minutes to a day. And because transforms run before load, fixing a bug in transformation logic means re-running the whole pipeline from extract, since the raw data was never kept.
A Concrete Example
Picture an e-commerce company. Orders live in a Postgres database, customer support tickets live in Zendesk, and ad spend lives in the Google Ads API. The finance team wants one dashboard showing profit per customer.
An ETL pipeline runs at 2 AM. It extracts yesterday's orders using the updated_at watermark, pulls new tickets from the Zendesk API, and pulls spend from Google Ads. The transform step converts every currency to USD, joins orders to customers, sums ad spend per customer, subtracts refunds flagged in support tickets, and produces one clean fact table keyed by customer and date. The load step bulk-writes that table into BigQuery.
By 7 AM the dashboard shows clean profit numbers without anyone touching the raw, messy source systems. The production database never gets hammered by analyst queries, and the warehouse only ever holds the curated result.
Where it is used in production
Apache Airflow
The most widely used open-source orchestrator for scheduling and monitoring ETL jobs as directed graphs of tasks.
Apache Spark
Runs the transform step at scale, splitting joins and aggregations across a cluster for terabyte-sized data sets.
AWS Glue
Amazon's managed ETL service that auto-generates Spark code and catalogs source schemas for loading into Redshift or S3.
Informatica PowerCenter
The classic enterprise ETL tool used by banks and large companies to move data into on-premise warehouses for decades.
Frequently asked questions
- What is the difference between ETL and ELT?
- In ETL the data is transformed before it lands, so the warehouse only stores clean data. In ELT raw data is loaded first and transformed afterward using SQL inside the warehouse. ELT keeps the raw data around for re-processing and is the common default with cloud warehouses like Snowflake and BigQuery.
- Is ETL the same as a data pipeline?
- ETL is one specific kind of data pipeline. A data pipeline is any system that moves data from one place to another, which can include streaming, replication, or simple copies. ETL is the pattern that specifically extracts, transforms, then loads, usually for analytics.
- Does ETL run in real time or in batches?
- Classic ETL runs in scheduled batches, often hourly or nightly. Streaming ETL exists and processes records continuously using tools like Kafka and Spark Structured Streaming, but most reporting pipelines are still batch because the destination dashboards do not need second-level freshness.
- Why not just query the production database directly?
- Production databases are tuned for fast single-row transactions, and large analytical scans would slow them down and risk the customer-facing app. ETL copies data into a warehouse built for big scans, isolating heavy analytics from live traffic and letting you join data from many different sources in one place.
- What tools are used to build ETL pipelines?
- Orchestration is commonly handled by Airflow or Dagster. Transformation runs on Spark, dbt, or plain Python. Managed services like AWS Glue, Google Cloud Dataflow, and Fivetran handle extract and load. Destinations are usually Snowflake, BigQuery, or Redshift.
Learn ETL hands-on
This page explains the idea. The full lesson lets you step through the ring as servers join and leave, read the implementation, and check yourself with a quiz. It is one of 760+ lessons in the System Design Masterclass, from your first API call to distributed consensus. Eleven Foundation lessons are free, no signup. Lifetime access is ₹499 in India or $7.99 worldwide, one payment, no subscription.
Related lessons
Lessons that touch on ETL as part of a larger topic.
ETL
Extract, Transform, Load, moving and reshaping data between systems
advanced · stream batch processing
Data Transformation
Convert data from one format, structure, or representation to another, the glue between incompatible systems
intermediate · data governance compliance
Data Cleansing
Fix, standardize, and repair dirty data, turning messy real-world inputs into reliable records
intermediate · data governance compliance
Data Migration
Moving data between systems, formats, or schemas safely and completely, with validation, rollback, and zero data loss
intermediate · devops cicd
ETL vs ELT for ML: Why Load-Then-Transform Won
ETL vs ELT explained for ML: why load-then-transform plus cloud warehouses and dbt beat transform-then-load, where transforms run, the medallion architecture, and when ETL still wins.
ml-intermediate · data engineering for ml
See also
Related glossary terms you might want to look up next.
Data Lake
A centralized repository that stores raw data at any scale in its native format. Unlike a data warehouse, data doesn't need to be structured or cleaned before loading.
Batch Processing
Processing large volumes of data in scheduled chunks rather than in real time. Think nightly reports, ETL jobs, and data warehouse loads.
Data Lineage
Tracking data from its origin through every transformation and system it passes through. Answers 'where did this number come from?' for audits and debugging.
Database Partitioning
Dividing a large table into smaller, more manageable pieces while keeping them in the same database. Sharding is partitioning across servers.
Read Replica
A copy of your database that handles read queries, reducing load on the primary database. Writes still go to the primary and replicate out.
Write-Ahead Log
A technique where changes are written to a log before being applied to the database. Ensures durability and crash recovery.