# ETL vs ELT: where the transformation happens

> ETL transforms data before loading it, ELT loads raw data first and transforms it inside the warehouse. Here is how to choose between them.

Published 2026-11-20 · Language: en · Tags: data-engineering, etl

Moving data from source systems into a place where people can analyse it has two classic shapes. The only real difference is the order of the steps and where the heavy work runs.

 

## ETL: extract, transform, load

 

In **ETL** you pull data out of the source, clean and reshape it on a separate processing server, and only then load the finished result into the target. The warehouse receives data that is already in its final form.

 

ETL made sense when warehouses were expensive and slow, so you kept as much work as possible outside them. It is still a good fit when you must remove or mask sensitive fields before they reach the destination, or when the target is not a database that can run transformations at all.

 

## ELT: extract, load, transform

 

In **ELT** you copy the data into the warehouse almost as it is, in a raw layer, and then transform it with SQL inside the warehouse. Modern cloud warehouses scale compute independently from storage, so running transformations where the data already lives is cheap and fast.

 

The big advantage is that the raw data is kept. If a business rule changes, or you find a bug in a transformation, you re-run the SQL over the raw layer instead of extracting everything from the source again.

 

```sql
-- raw layer: loaded as is
CREATE TABLE raw_orders (id bigint, payload jsonb, loaded_at timestamptz DEFAULT now());

-- transformed layer: built from raw with plain SQL
CREATE TABLE orders AS
SELECT (payload ->> 'id')::bigint AS order_id,
       (payload ->> 'total')::numeric AS total,
       (payload ->> 'created_at')::timestamptz AS created_at
FROM raw_orders;
```

 

## How to choose

 

- Choose **ELT** when the target is a modern warehouse, the team is comfortable with SQL and you want to keep raw history for reprocessing.
- Choose **ETL** when data must be filtered or anonymised before it lands, when the volume of useless data is huge and not worth storing, or when transformations need code that SQL cannot express well.
- Many real pipelines mix both: a small transformation on the way in (drop secrets, fix encoding), and the business logic in SQL afterwards.

 

## A common pitfall

 

Loading raw data does not mean loading it carelessly. Keep the raw layer append-only, record when each row was loaded, and never let dashboards read from it directly. Analysts should query the transformed layer, where names are consistent and rules are documented.

 

## Takeaway

 

The question is not which acronym is better. Ask where the transformation should run, whether you need the raw data later, and what must never reach the destination. The answers usually point to one of the two quickly.

Source: https://tdphat.io.vn/blog/etl-vs-elt-explained
