ETL vs ELT: what actually changes when you move the T
The flow, side by side
ETL source ──▶ [Spark / Informatica / Python] ──▶ warehouse (clean only)
transform BEFORE loading
ELT source ──▶ warehouse (raw) ──▶ [SQL / dbt in-warehouse] ──▶ marts
transform AFTER loadingIn ETL, the warehouse only ever sees finished data. In ELT, the warehouse holds everything and becomes the transformation engine.
The comparison table you actually need
| Dimension | ETL | ELT |
|---|---|---|
| Where transform runs | Separate compute (Spark, Python) | Inside the warehouse |
| Raw data kept? | Usually not | Yes — that's the point |
| Reprocess history | Re-extract from source | Rebuild from raw tables |
| Primary language | Python / Scala / Java | SQL (+ Jinja via dbt) |
| Who can contribute | Data engineers | Engineers + analysts |
| PII handling | Mask before landing — easy | Lands raw — needs governance |
| Cost driver | Cluster time | Warehouse credits + storage |
| Typical stack | Spark, Airflow, custom code | Fivetran/Airbyte, Snowflake, dbt |
Concrete example: the same job, both ways
ETL — clean in PySpark, land only the result:
orders = spark.read.json("s3://raw/orders/")
clean = (orders
.dropDuplicates(["order_id"])
.withColumn("amount_usd", col("amount_cents") / 100)
.filter(col("status").isNotNull())
.drop("credit_card_number")) # PII never reaches the warehouse
clean.write.mode("append").saveAsTable("warehouse.orders")ELT — land everything, clean with SQL in the warehouse:
-- models/staging/stg_orders.sql (dbt)
select distinct on (order_id)
order_id,
customer_id,
amount_cents / 100.0 as amount_usd,
status,
ordered_at
from {{ source('raw', 'orders') }}
where status is not null
order by order_id, ingested_at descNote the difference in blast radius: the PySpark job dropped the credit card column permanently; the dbt model just doesn't select it, and the raw column still exists in the warehouse. That's a governance decision, not a style preference.
Choose ETL when…
- Regulated PII must be masked or tokenized before it lands anywhere.
- You're filtering 10 TB down to 50 GB — paying to store the rest is waste.
- The transformation isn't expressible in SQL (image parsing, ML inference, complex parsing).
- The destination isn't a warehouse (a search index, an API, a key-value store).
Choose ELT when…
- You want to reprocess history when business logic changes — and you will.
- Analysts should own transformations, not file tickets for them.
- Your warehouse (Snowflake, BigQuery, Databricks) scales compute independently.
- You want lineage, tests and docs generated automatically from the code.
What most real teams actually run
A hybrid. Sensitive or huge sources get an ETL pre-step (mask, sample, pre-aggregate), everything else lands raw and gets ELT'd with dbt into a medallion layout. If you can explain why a specific source sits on either side, you're already answering this better than most candidates.
FAQ
- What is the difference between ETL and ELT?
- In ETL you Extract from the source, Transform on a separate compute layer, then Load the finished tables into the warehouse. In ELT you Extract, Load raw data into the warehouse first, and Transform inside the warehouse using its own compute — usually with SQL and dbt.
- Is ELT better than ETL?
- ELT is the default for cloud warehouses because storage is cheap and warehouse compute is elastic, so you keep raw data and can reprocess it anytime. ETL is still the right answer when you must mask or drop sensitive data before it lands, when the source volume is far bigger than what you need, or when transformation requires non-SQL processing.
- Is dbt an ETL or ELT tool?
- dbt is the T in ELT. It transforms data that already sits in the warehouse — it does not extract or load.
- Does ELT cost more?
- It shifts cost. You store more raw data (cheap) and buy more warehouse compute (not cheap). Teams control it with incremental models, partition pruning, and dropping Bronze data past its retention window.
- Which one do employers ask about in interviews?
- Both, but they want reasoning, not definitions. The strong answer names a trade-off: PII masking or extreme volume pushes work upstream into ETL; auditability and reprocessing pull it into ELT.
Ready to start?
7 days free. Then less than a coffee per month.
Build both pipelines — 7 days free- No credit card for the trial
- Cancel anytime
- 300+ exercises
- 14 full courses