Overview
Curated: · Written: · Reviewed:
ETL vs. ELT
In one line
ETL transforms data before it lands in the target. ELT lands source-shaped data and transforms it inside the warehouse's own compute. Reach for ELT when the warehouse can absorb the volume and you need retained raw for replay. Reach for ETL when sensitive fields must be masked or dropped before they enter the target.
Key definitions
- Staging transform: transform on a separate processing tier (Spark, Glue, Informatica) before the load.
- Warehouse-native compute: SQL models that run inside BigQuery, Snowflake, Databricks SQL or Redshift.
- Retained raw layer: source-shaped landing data kept so models can be re-run without re-extracting.
- Watermark: a stable source position that bounds each incremental extract.
- Idempotent write: a retry leaves the target in the same state as one successful run.
- Schema-on-read: structure applied when a model reads the data, not when it lands.
Formulas and complexity
Warehouse cost for ELT is bytes scanned times the rate: A full-table scan of 2.9 PB (2,920 TB) at that rate costs about $18,250 per run: 2,920 × 6.25. Staging cost is node-hours: 20 nodes × 6 h × $3 = $360 per night. Compare the two bills for the same job, using the same unit of work.
How it works
- ETL: extract, transform on a staging cluster, load only the modeled result. The target sees only rows that passed.
- ELT: load everything extracted, then run SQL models in place. Re-running a corrected rule needs no re-extract.
- Most real pipelines are hybrid: mask at extract, model in the warehouse.
- Correctness comes from watermarks, deterministic keys and idempotent merges, not from where the transform sits.
When to use and when not to
| Factor | Favors ETL | Favors ELT |
|---|---|---|
| Sensitive fields (card data, PII) | must be masked before landing | raw may land if policy permits it |
| Target capacity | fixed, or cannot parse the format | elastic, absorbs the source volume |
| Replay and corrections | one consumer, one feed | many models, audits, re-runs |
| Cost model | staging is cheaper per unit of work | warehouse scan and compute is cheaper |
| Latency | inline transform before the write | batch loads that tolerate warehouse compute |
| Team skills | procedural Spark already running | SQL-first team |
Traps interviewers probe
- Calling ELT modern and stopping there. Fix: name the placement axis and the condition that flips the decision.
- Treating raw as ungoverned. Fix: exclude prohibited fields at source, encrypt, and control access to the raw layer.
- Assuming a green run means correct. Fix: reconcile row counts and dollar sums to the source control totals.
- Believing a faster in-warehouse mask satisfies a no-raw-at-rest rule. Fix: the unmasked value has already landed. Mask before the write.
- Casting bad records to null. Fix: quarantine incompatible records in an owned table and alert the owner.
Interview tips
Open with the axis: the question is where the transform runs relative to the load, and what that placement buys or costs. Then name the constraint that decides it.
Follow-ups to expect:
- If the warehouse can mask in 6 minutes, does that change the answer? Only if the unmasked value never lands.
- How do you replay a corrected rule? For ELT, re-run SQL over retained raw. For ETL, re-extract or re-run the staging job.
- How do you stop duplicates after a retry? Deterministic keys and an idempotent merge.
- How do you control warehouse cost? Incremental models, partition pruning and workload isolation.
30-second outline: ETL transforms before the load and ELT loads source-shaped data and transforms inside the target. I choose by the binding constraint. If sensitive fields must not land, or the target cannot absorb the load economically, I transform first. Otherwise I land raw, keep it for replay, and run SQL models in the warehouse with watermarks and idempotent merges. I usually go hybrid: mask at extract, model in place. I verify with reconciliation to the source control totals.
Feedback on this overview
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.