Table of Contents
ETL stands for extract, transform, and load. It copies data from source systems, prepares it, and loads the result into a destination such as a data warehouse. ELT moves the transformation after the load, so the destination does most of the processing.

How ETL works: A daily sales report
- Extract: Read store transactions and online order records. After the first full read, use a change feed or a reliable update marker to pick up new and changed records.
- Transform: Standardize timestamps and product IDs, apply return rules, and remove duplicates using a documented transaction key. Send records that fail validation to a review area. A missing amount is different from zero.
- Load: Write the prepared records into a sales table. Check row counts and reconcile the total with the source. Use a stable key or safely replace the target batch so a retry doesn’t count a sale twice.
Define what one row represents before combining sources. A sales table with one row per order item will produce different counts from one with a row per order. The SQL summary lab shows how joins can duplicate counts.
ETL vs. ELT: Where do you clean the data?
| Approach | Where transformation happens | When it fits |
|---|---|---|
| ETL | Before loading into the destination | The target needs a fixed schema, or sensitive fields must be removed before the data reaches it. |
| ELT | After loading into the destination | The destination has enough compute to transform raw data, and controlled access to that raw data is acceptable. |
In ELT, the sales feeds could land in restricted raw tables first, followed by SQL that builds the reporting table. Keeping the raw copy can help if a business rule changes. It also adds storage, access, and retention decisions. Both approaches can use batches or frequent updates.
Choose a refresh and recovery strategy
A full refresh can replace a small lookup table. Use incremental loads when copying the whole dataset is impractical. Test updates, deletes, late-arriving records, and reruns. Keep batch counts and error logs, and compare a known day’s totals before readers rely on the report. For spreadsheets or CSV feeds, start by standardizing table fields and data types.
Reader Comments 0
Sign in with email or Google to join the discussion.