$ airbyte sync && dbt build
ELT
ELT (Extract, Load, Transform) is a data integration pattern that copies data from source systems into the warehouse or lakehouse as-is, and only then transforms it with SQL running inside that warehouse. Compared to ETL, the last two letters swap places: loading comes first, transformation second.
ELT became the default once cloud warehouses (Snowflake, BigQuery, Redshift, Databricks, ClickHouse) made storage cheap and compute elastic. If the warehouse can transform a billion rows in seconds, there’s little reason to run a separate transformation server, and keeping the raw data means you can always change your mind later.
How it works
$ airbyte sync && dbt build
Load raw first, transform inside the warehouse
- Three sources and one warehouse, organized in layers: raw, staging and marts.
- Extract + Load: a connector copies tables and API objects into the raw layer unchanged. No business logic yet.
- Transform, step one: SQL models clean and type each raw table: rename columns, cast types, drop test rows.
- Step two: models join staging tables into marts, the facts and dimensions that dashboards query.
- Raw data stays. When a rule changes, you rebuild the marts from raw with SQL. No need to touch the sources again.
The modern ELT stack
- Extract and load: managed or open-source connectors such as Fivetran, Airbyte, dlt, Meltano or the warehouse’s own ingestion (Snowpipe, BigQuery Data Transfer). For databases, connectors often use CDC under the hood.
- Transform: dbt or SQLMesh. Each model is a
SELECTstatement in a Git repo; the tool works out the dependency order, runs it in the warehouse, and tests the results. - Orchestrate: Airflow, Dagster or Prefect trigger the load, then the transform. See Pipeline Orchestration.
A dbt model is just SQL:
-- models/marts/fct_revenue.sql
SELECT o.order_id, o.ordered_at::date AS order_date, c.amount_usd
FROM {{ ref('stg_orders') }} o
JOIN {{ ref('stg_charges') }} c USING (order_id)
WHERE c.status = 'succeeded'ETL vs ELT
| ETL | ELT | |
|---|---|---|
| Order | Extract → Transform → Load | Extract → Load → Transform |
| Transform engine | Separate server or cluster | The warehouse itself |
| Raw data kept | Usually not | Yes, in the raw layer |
| Change a rule | Re-extract and re-run | Re-run SQL |
| Skills needed | Spark, Python, ETL tools | Mostly SQL |
| Main risk | Rigid, slow to change | Raw PII lands in the warehouse; warehouse bill grows |
Common mistakes
- Treating raw as a dumping ground. Without staging models and tests, every analyst cleans the same raw table differently.
- Rebuilding everything on every run. Use incremental models for large fact tables, or the warehouse bill will tell you.
- Forgetting governance. Raw tables contain personal data. Restrict access to the raw layer and mask in staging.
- No tests. Add
unique,not_nulland relationship tests on keys from the first model.