ETL vs ELT and Load Patterns

Understand why the industry moved from ETL to ELT, and master load patterns: full refresh, append, incremental, upsert, idempotency and backfills.

Intermediate · about 4 hours · difficulty 3/5

Learn first: How Cloud Data Warehouses Work, Ingesting Data from APIs

ETL (extract, transform, load) transforms data before it reaches the target, historically in tools like Informatica or SSIS. ELT loads raw data into a cheap, powerful warehouse or lakehouse first, then transforms it with SQL. Cloud warehouses made ELT the default.

Why ELT won

  • Raw data is preserved, so you can rebuild when logic changes.
  • SQL transformations are version-controlled, testable and readable by analysts.
  • Warehouse compute scales on demand.

ETL still makes sense for heavy cleansing, PII masking before load, or streaming enrichment.

Load patterns

  • Full refresh: drop and rebuild. Simple and correct; expensive for big tables.
  • Append-only: add new rows (events, logs).
  • Incremental: process only new or changed rows since the last run, using a watermark.
  • Upsert / MERGE: insert new keys, update existing ones.
  • Partition overwrite: recompute and replace whole date partitions; a robust middle ground.

Idempotency and backfills

A job is idempotent if running it twice for the same input gives the same result. This is the most important property of a pipeline: it lets you retry failures and backfill history (rerun for past dates) safely. Design every job around a logical date parameter and deterministic outputs.

Late-arriving data

Records sometimes arrive days late (offline POS terminals syncing). Reprocess a lookback window (say the last 3 days) on each run.

Pitfalls

  • Append jobs that duplicate data when retried.
  • Using now() inside transformations instead of the run's logical date, making backfills wrong.

You are ready to move on when you can take any pipeline you have built and prove it is idempotent by running it twice for the same date and showing identical output.

Key concepts

  • ETL vs ELT
  • Full refresh
  • Append-only loads
  • Incremental loads
  • Upsert and MERGE
  • Idempotency
  • Backfills
  • Late-arriving data

Mini project

Write the same daily load three ways (full refresh, append, partition overwrite) against DuckDB or PostgreSQL. Run each twice for the same date and once for a backfill range, and document which ones stay correct.

Check yourself

Your daily job failed after writing half its data and then succeeded on retry. How do you know whether the table now contains duplicates, and how should it have been designed?

Free resources