Architectures and pipelines
By the end of this module you will be able to:
- Distinguish ETL from ELT and explain when each is appropriate
- Compare batch and streaming processing for a given latency requirement
- Describe the key architectural difference between a data warehouse and a data lake
- Identify the role of each component in a modern data stack
Pipeline as a chain of contracts from source to serve
Only the rows the validate stage approves travel on to transform and serve, and the rejected ones go to quarantine with a reason and re-enter validate after repair, so a failure holds data back rather than losing it quietly.
A pipeline is a chain of explicit contracts, not a flat sequence of scripts. Source, ingest, validate, transform, serve each carry their own contract; failures route to quarantine and replay back into validate. Databricks' medallion pattern has three layers, not five stages: bronze holds what ingest lands raw, silver the validated and cleaned data, and gold the enriched tables that are served.
Four named pipeline failure modes with four actions
Each of the four modes carries its own action, reject and alert, hold and repair, refresh, or notify the consumer, making the name you give the failure the thing that stops a quality miss being discarded as schema drift.
Pipeline failures have four named modes: schema drift, quality miss, freshness miss, and downstream contract break. Each has a different action: reject + alert, hold + repair, refresh, notify consumer. Naming the mode turns vague pipeline-broken alerts into specific actions.
In 2016 Netflix handled about 500 billion events a day. Not all of them needed the same speed.
In February 2016 Netflix reported that its data pipeline handled about 500 billion events and 1.3 PB of data a day. Events entered through Kafka, and a routing service sent them on to S3 for Hive batch jobs, which usually scan data daily or hourly, and to Elasticsearch or a second Kafka cluster for real-time use.
The architecture choice determines what is possible. The Foundations stage covered what data is and how to judge its quality, and the Modelling and statistics stage covered how to structure and analyse it. This module opens Stage 3, Engineering and platforms, by examining how data moves through systems at scale.
Some questions about those events can wait for an hourly batch; others need what happened in the last minute. How does one pipeline serve both?
A data pipeline is a sequence of automated processes that moves data from source systems to a destination, applying transformations along the way. Every pipeline must answer three questions: where does the data come from, what processing is required, and where does it need to go?
The first architecture decision is where transformation should happen.
12.1 ETL versus ELT
ETL (Extract, Transform, Load) transforms data outside the destination in a separate processing layer, then loads clean data. ELT (Extract, Load, Transform) loads raw data first, then transforms inside the destination using its compute power.
ETL dominated when warehouse compute was expensive. ELT became more common because cloud warehouses like BigQuery, Snowflake, and Redshift offer elastic compute that makes in-warehouse transformation faster and cheaper than external processing. dbt (data build tool) is a widely used ELT transformation tool, using SQL models versioned in Git.
Data architecture defines the blueprint for managing data assets by aligning with organisational strategy to establish strategic data requirements and designs to meet those requirements.
DAMA frames architecture as strategy-driven, not technology-driven. The choice between ETL and ELT, batch and streaming, warehouse and lakehouse all depend on what the organisation needs from its data, not on which technology is newest.
Common misconception
“ELT is always better than ETL because it uses the warehouse's compute.”
ELT is more efficient when the destination has elastic compute (cloud warehouses). But ETL remains appropriate when the transformation needs libraries the destination cannot host (some Python ML or geospatial packages), when data must be cleansed before entering a regulated destination, or when the destination has limited compute capacity. The choice is architectural, not dogmatic.
The next decision is how fresh the data must be for the decision it supports.
12.2 Batch versus streaming
Batch processing collects data over a period (hourly, daily, weekly), then processes it all at once. Streaming processing handles data continuously as it arrives, event by event. The trade-off is latency versus complexity.
Batch is simpler, cheaper, and sufficient for many analytical workloads. Streaming is necessary when decisions depend on fresh data: fraud detection where seconds matter, recommendation engines where the next suggestion must appear before the user leaves, and operations centres monitoring live systems.
Apache Kafka is a widely deployed streaming platform. It handles event ingestion at millions of events per second. Apache Flink and Spark Structured Streaming process those events with transformations and aggregations.
“Processing real time streaming data requires throughput scalability, reliability, high availability, and low latency to support a variety of applications and workloads.”
AWS Well-Architected Framework, Data Analytics Lens - Streaming ingest and stream processing
AWS's guidance makes the trade-off explicit. Streaming is an operating capability with reliability, scalability, and latency obligations, not just a faster version of batch.
Storage architecture then decides what structure, governance, and engines the platform can support.
12.3 Warehouse, lake, and lakehouse
A data warehouse (Snowflake, BigQuery, Redshift) stores structured, schema-enforced data optimised for SQL analytics. It provides fast query performance but requires data to be modelled before loading.
A data lake (S3, Azure Data Lake, GCS) stores raw data in any format: structured, semi-structured, and unstructured. It provides flexibility but risks becoming a "data swamp" without governance, cataloguing, and quality controls.
A data lakehouse pattern (Databricks Lakehouse, Apache Iceberg, Delta Lake) combines both: open file formats stored in a lake with warehouse-like features (ACID transactions, schema enforcement, time-travel queries). The lakehouse pattern emerged around 2020 as a major modern architecture for organisations that need both analytical and machine learning workloads.
Common misconception
“A data lake is just a cheap data warehouse.”
A data lake stores raw files in any format, including images, log files and sensor dumps that a warehouse is not built to hold. Warehouses do store semi-structured data such as JSON (Snowflake's VARIANT type, for example), so the key difference is schema enforcement: warehouses usually enforce schema-on-write for their tables (define the structure before loading), while lakes allow schema-on-read (interpret the structure when querying). A lakehouse adds warehouse-like governance to lake storage.
A fintech startup uses BigQuery as its data warehouse. Raw transaction data lands in BigQuery via Fivetran connectors. A data engineer writes SQL transformations in dbt to create analytics-ready tables. Which pipeline pattern is this?
A logistics company needs to calculate optimal delivery routes. Route calculations require Python geospatial libraries (not SQL). The results feed into an operational database. Should this use ETL or ELT?
A bank runs nightly batch pipelines for regulatory reporting. The CFO asks whether switching to streaming would improve report accuracy. What is the best response?
A retail company loads daily sales CSVs into a data warehouse using an ETL process. They want to add real-time inventory updates. Which architecture change is most appropriate?
Architecture checks to carry forward
- ETL transforms before loading. ELT loads first and transforms in the destination. The right choice depends on regulation, tooling, compute location, cost, and workload.
- Batch handles scheduled chunks. Streaming handles events as they arrive. Streaming needs reliability, availability, throughput, latency controls, and stronger operational discipline.
- Warehouses optimise governed SQL analytics. Lakes store varied raw data with schema-on-read. Lakehouse table formats add transactions, schema evolution, and time travel to lake storage.
- A production stack needs observability across ingestion, storage, transformation, serving, and quality. Monitoring is part of the architecture, not an afterthought.
- Architecture choices should start from latency, scale, cost, risk, and decision need. Technology trends are not requirements.
Standards and sources cited in this module
DAMA-DMBOK2 Revised (2024) (print edition; the link is DAMA's publisher page, not the chapter text)
Data Architecture knowledge area
Defines data architecture as strategy-driven, not technology-driven. Provides the conceptual framework for pipeline and storage architecture decisions.
AWS Well-Architected Framework, Data Analytics Lens
Batch and streaming data processing
Industry guidance on batch processing, streaming processing, reliability, latency, and workload trade-offs.
Databricks, 'Lakehouse: A New Generation of Open Platforms' (2021)
Full paper
Academic paper introducing the lakehouse architecture combining lake storage flexibility with warehouse-like governance.
Project overview
Open table format reference for schema evolution, time travel, and reliability features in lakehouse-style architectures.
dbt Labs, 'What is dbt?' (2024)
Documentation
dbt is a widely used ELT transformation tool. Used in the terminal simulation and referenced throughout the ELT discussion.
Netflix Technology Blog, 'Evolution of the Netflix Data Pipeline' (2016)
Full post
Source for the 2016 figure of about 500 billion events and 1.3 PB a day, and for the Kafka-fronted pipeline that routes events to S3 for Hive batch jobs and to Elasticsearch for real-time use in the opening case study.
The artefact this module describes, as something you can fill in.
Module 22 of 52 · Engineering and platforms