Pipeline Anatomy: Beginner
What you will be able to do
Why Pipelines Exist
Recognize the structural reason pipelines exist and name the three gaps a pipeline closes.
Three Gaps That Force a Pipeline
| Gap | What It Means | Concrete Example |
|---|---|---|
| Location | Data is created in one system, needed in another | App writes to Postgres; analyst reads from Snowflake |
| Shape | The shape that is fast for the writer is slow for the reader | Normalized rows for transactions; wide denormalized columns for dashboards |
| Time | Data is produced continuously; reports want a daily or hourly snapshot | Click events stream all day; the marketing team wants a 9am summary |
- ▸Data flows in one direction from sources to consumers
- ▸Each step transforms or moves the data toward the consumer's needed shape
- ▸The pipeline runs on a schedule or in response to events, not on every individual request
Without a Pipeline
- Analytics queries hit production and slow the app
- Every report is a one-off manual extract
- Data is stale by the time it is read
- No one knows which numbers are authoritative
- Production stays fast; analytical work runs on a copy
- Reports run on demand from a prepared dataset
- Freshness is explicit and known (last hour, last day)
- One pipeline produces the canonical numbers; debates end
The Smallest Possible Pipeline
If a question can be answered by a single SQL query against the existing database, a pipeline is overkill. Pipelines exist because most real questions cannot.
The Four Roles in Any Pipeline
Identify the four roles in any pipeline diagram: source, transform, storage, consumer.
Role 1: Source
| Source Type | What It Looks Like | Typical Cadence |
|---|---|---|
| Operational database | Tables in Postgres, MySQL, or DynamoDB the app writes to | Continuous writes; pipeline pulls every N minutes |
| Event stream | Kafka topic, Kinesis stream, Pub/Sub topic of individual events | Continuous; pipeline consumes as events arrive |
| Third-party API | REST or GraphQL endpoint owned by a vendor | Pipeline polls on a schedule, respects rate limits |
| File drop | A directory or bucket where a partner deposits CSV, JSON, or Parquet | Hourly, daily, or whenever the partner uploads |
Role 2: Transform
Role 3: Storage
Role 4: Consumer
All Four Roles in One Sentence
- Name the four roles for any pipeline before adding detail
- Treat sources as untrusted: their schema and timing can change
- Pick the storage layer based on how the consumer will read it
- Confuse storage with source (the same Postgres table can be either, depending on the pipeline's role)
- Skip storage between transforms in long pipelines (failures lose work)
- Build pipelines without a named consumer in mind
The four roles every pipeline has: a source produces data, transforms reshape it, storage holds it, and a consumer reads it. Data flows left to right.
Reading a Pipeline Left to Right
Read a pipeline diagram, name the role of every box, and trace the direction of data flow.
The Reading Convention
| Diagram Element | What It Means | What It Does Not Mean |
|---|---|---|
| Box on the left | A source: data originates here | Not necessarily a database; could be an API or file drop |
| Box in the middle | A transform or a storage layer (or both, in modern lakehouses) | Order matters; left-to-right is the temporal sequence |
| Box on the right | A consumer: someone or something reads the data here | Not always a dashboard; can be an ML pipeline or reverse-ETL |
| Arrow from A to B | Data flows from A to B | Not bidirectional; pipelines have direction |
| Dashed arrow | Often a control dependency, not a data flow | B waits for A, but data may not actually transfer between them |
A Real Diagram, Read Out Loud
What the Arrows Hide
- ▸How often does each step run? Continuous, hourly, daily?
- ▸What happens if a source is unavailable when the pipeline tries to read?
- ▸Where is data durable, and where is it in flight?
- ▸Who is the consumer at the end, and what is their freshness expectation?
- ▸What runs first, what runs after, and how does the system know?
Branching and Joining
A First End-to-End Pipeline
Walk through a one-source, one-transform, one-destination pipeline end to end and describe what each step produces.
Step 1: Identify the Source
Step 2: Land Raw Data in Storage
Step 3: Transform
Step 4: Serve the Consumer
The Whole Picture
| Step | Role | What It Produces |
|---|---|---|
| 1. Extract from Postgres | Source consumption | Raw rows for the day |
| 2. Land in S3 | Storage (raw zone) | Durable file partitioned by date |
| 3. Aggregate in Snowflake | Transform + storage (curated) | Daily summary table |
| 4. Looker reads | Consumer | The chart the marketing team wanted |
When a Pipeline Is Not Needed
Decide whether a problem warrants a pipeline or whether a query, replica, or cache solves it more cheaply.
Three Cases Where a Direct Query Is Better
| Situation | Why a Pipeline Is Overkill | What to Do Instead |
|---|---|---|
| One-time question | The cost of building exceeds the value of the answer | Run a SQL query, save the result to a doc, move on |
| Tiny dataset, infrequent reads | The data fits in a spreadsheet and changes once a quarter | Use a Google Sheet or a static CSV in version control |
| Dataset already shaped for the consumer | The source already produces what the consumer needs | Point the consumer at the source directly |
When the Read Replica Is the Right Answer
When an Application Should Just Cache
- Multiple consumers will read the same prepared dataset
- The transform logic is non-trivial and changes over time
- Source data is large enough that ad-hoc queries hurt production
- Freshness, lineage, and monitoring matter to the business
- A single one-off question that may never be asked again
- A read replica solves the slowness problem alone
- The dataset is small and changes only when a human edits it
- The consumer is the application, and a cache fits the access pattern
The Pipeline Test
- ▸Will the same prepared data be read more than once?
- ▸Does the transform involve more than a single SELECT?
- ▸Is the consumer separate from the source (different system, different team, different freshness)?
- ▸Will the work need to be re-run on a schedule?
- Apply the four-question test before reaching for orchestration tools
- Use read replicas for analytics on small datasets with simple needs
- Prefer caches and materialized views when the consumer is the application
- Build a pipeline for a question that has been asked exactly once
- Reach for Airflow when a daily SQL query in a scheduled job suffices
- Confuse 'we need data faster' with 'we need a pipeline'; sometimes the right fix is upstream
> A startup CTO has just hired their first data engineer. The CTO says: 'We have Postgres for the app, Stripe for payments, and Zendesk for support tickets. The product team wants a weekly retention dashboard, the finance team wants monthly revenue by plan, and customer support wants to know which users opened tickets in their first week. Where do we start?'
Data lives where it is created, not where it is needed; pipelines move and reshape it
- Category
- Pipeline Architecture
- Difficulty
- beginner
- Duration
- 25 minutes
- Challenges
- 0 hands-on challenges
Topics covered: Why Pipelines Exist, The Four Roles in Any Pipeline, Reading a Pipeline Left to Right, A First End-to-End Pipeline, When a Pipeline Is Not Needed
Lesson Sections
- Why Pipelines Exist (concepts: paEltVsEtl)
Every company that runs software produces data in one shape and needs it in a different shape, in a different place, on a different schedule. That gap is the entire reason data engineering exists. The gap is not a bug. It is structural. Operational systems are built to handle one user at a time, fast, with strict consistency. Analytical systems are built to scan billions of rows, slow per row, with relaxed consistency. The two are different machines optimized for different jobs. Three Gaps That
- The Four Roles in Any Pipeline (concepts: paEltVsEtl)
Every pipeline, no matter how complex, can be described in terms of four roles. A source produces data. A transform reshapes it. Storage holds it for later. A consumer reads it for some purpose. Real pipelines often have many of each, chained together, but the roles do not change. Naming the four roles is the single most useful skill a new data engineer can develop, because once they are named, every architecture diagram becomes legible. Role 1: Source A source is wherever data originates. It is
- Reading a Pipeline Left to Right (concepts: paDagOrchestration)
Architecture diagrams are the lingua franca of data engineering. Reading one fluently is more useful than knowing any specific tool. The convention is left-to-right, sources on the left, consumers on the right, with arrows showing the direction data flows. The arrows are not optional decoration; they encode the most important fact about the system, which is which way data moves. The Reading Convention A Real Diagram, Read Out Loud Read top to bottom or left to right; both work. Spoken aloud: 'A
- A First End-to-End Pipeline (concepts: paMedallion)
Vocabulary becomes useful when applied to a concrete case. Take a small subscription product that wants a daily report of new signups by country. The data exists. The app records every signup to a Postgres table. The marketing team wants a chart on Monday morning showing last week's daily numbers, broken out by country. There is no pipeline. The work below builds one, end to end, with each role visible. Step 1: Identify the Source The source is the Postgres signups table. It has many columns; th
- When a Pipeline Is Not Needed (concepts: paCostOptimization)
Building a pipeline is engineering work. It carries cost: the code itself, the orchestration that runs it, the storage it consumes, the alerts that fire when it fails, the on-call rotation that responds to those alerts. Engineers reach for pipelines reflexively, but a pipeline is the wrong answer to many problems. Knowing when to skip the pipeline is a more senior skill than knowing how to build one. Three Cases Where a Direct Query Is Better When the Read Replica Is the Right Answer Many compan