Glossary · Data architecture
What is ELT (extract, load, transform)?
ELT loads raw source data into the warehouse first and transforms it there with SQL, while ETL transforms data before loading it. Cloud warehouses such as BigQuery made ELT the default, because storage is cheap and SQL engines scale.
ETL versus ELT
In ETL, a separate engine (an ETL server, Spark or Dataflow job) extracts data, transforms it and loads only the result into the warehouse. In ELT, the raw data lands first, and transformations run inside the warehouse as SQL. The shift happened because cloud warehouses separate cheap storage from elastic compute: keeping raw history costs little, and the warehouse is usually the fastest place to join and aggregate it.
ELT has practical advantages beyond speed. Raw data stays available, so a bug in a model is fixed by rerunning the model instead of re-extracting from the source. Transformations are SQL files under version control, testable and readable by analysts.
ELT on BigQuery
- Extract and load: batch load jobs (free using the shared slot pool), the BigQuery Data Transfer Service for SaaS sources and scheduled queries, Datastream for database replication, Pub/Sub BigQuery subscriptions for events, and the Storage Write API for custom streaming.
- Transform: dbt or Dataform models, scheduled queries, or procedures orchestrated by Airflow. Layers often follow the medallion architecture.
A typical first transformation turns raw JSON into a typed, deduplicated table:
CREATE OR REPLACE TABLE `my-project.staging.orders`
PARTITION BY DATE(created_at)
AS
SELECT
JSON_VALUE(payload, '$.id') AS order_id,
JSON_VALUE(payload, '$.customer_id') AS customer_id,
SAFE_CAST(JSON_VALUE(payload, '$.amount') AS NUMERIC) AS amount,
TIMESTAMP(JSON_VALUE(payload, '$.created_at')) AS created_at,
_loaded_at
FROM `my-project.raw.orders_events`
WHERE TRUE
QUALIFY ROW_NUMBER() OVER (
PARTITION BY JSON_VALUE(payload, '$.id')
ORDER BY _loaded_at DESC) = 1;
SAFE_CAST returns NULL instead of failing the job on a malformed amount, and QUALIFY keeps the latest version of each order. See JSON_VALUE, SAFE_CAST and QUALIFY.
Cost and design notes
- The T is the bill. In ELT most spend is transformation queries. Full rebuilds of large models every hour add up; incremental models that process only new partitions cost a fraction.
- Raw data includes personal data. Loading first means PII lands in the warehouse; restrict raw datasets and mask or drop sensitive columns in the first model.
- Retention. Set partition expiration on raw tables you can reload from the source.
- Rerunnable models. Write transformations so a rerun gives the same result; see idempotent pipeline.
FAQ
Is ELT better than ETL?
For analytics on a cloud warehouse, ELT is usually simpler: one copy of the raw data, transformations in SQL, and the ability to rebuild models from history. ETL still fits when data must be filtered, masked or heavily reshaped before it may land, or when the transformation is not a good fit for SQL.
Does loading data into BigQuery cost money?
Batch load jobs are free when they use the shared slot pool; you pay for the storage of what you load. Streaming ingestion through the Storage Write API is billed, and so are the queries that transform the data afterward.
Which tools do ELT on BigQuery?
Extraction and loading are handled by services such as the BigQuery Data Transfer Service, Datastream, Pub/Sub BigQuery subscriptions or third-party connectors. Transformation runs as SQL through dbt, Dataform, scheduled queries or stored procedures.
