Data pipeline in 3D

A standing board shows a data pipeline flowchart: sources, ingestion, transformation, storage and analysis blocks linked by arrows.Drag to turn

A data pipeline is a series of automated steps that moves data from one or more sources to a destination, such as a database or a model, and transforms it along the way. Each step takes the output of the step before it as its input.

What a data pipeline is

Raw data is rarely ready to use. It may sit in separate systems, use different formats, and contain errors or gaps. A data pipeline is the automated path that collects this data and turns it into a consistent form that analysts or models can use.

A pipeline is usually described as a chain of stages. The output of one stage becomes the input of the next. Because the steps are automated, the same process can be repeated on a schedule or run continuously.

The main stages and how data flows

The first stage is ingestion, where data is read from sources such as files, application databases, or sensors. The next stage is transformation, where the data is cleaned, filtered, joined with other data, and reshaped. The last stage is loading, where the result is written to a destination such as a data warehouse.

Two common designs exist. In ETL (extract, transform, load), data is transformed before it reaches the destination. In ELT, raw data is loaded first and transformed inside the destination. Pipelines also differ in timing. Batch pipelines process data in groups at set times, while streaming pipelines process each record soon after it arrives.

Worked example: a daily sales pipeline

A shop records sales in a database. Each night a batch pipeline extracts the day's rows. Suppose it extracts 1,000 rows. The transform step removes 50 duplicate rows and 20 rows with a missing price, leaving 1,000 - 50 - 20 = 930 rows.

The pipeline then adds a column for revenue, equal to quantity times price. A row with quantity 3 and price 10 gives revenue 3 x 10 = 30. Finally, it loads the 930 clean rows into a warehouse table that feeds a dashboard. If the load step fails, the pipeline can be rerun for that day.

Common misconceptions

A pipeline is not the same as a database. A database stores data, while a pipeline moves and changes it. Pipelines usually write into databases, but they are separate things.

Another misconception is that a pipeline is built once and then left alone. Source formats change, volumes grow, and errors appear, so pipelines usually need monitoring and checks on data quality. A pipeline that runs without errors can still produce wrong output if the input data changed in an unnoticed way.

Where pipelines show up

Pipelines feed business reports and dashboards, where they gather data from many systems into one place. They also prepare training data for machine learning, and the same cleaning steps are often applied again when a trained model makes predictions. Online services use streaming pipelines for tasks such as fraud checks, where results are needed within seconds.

Key terms

Ingestion
The stage where data is read from its sources into the pipeline.
Transformation
Cleaning, filtering, joining, or reshaping data so it fits its intended use.
ETL
Extract, transform, load: data is transformed before it is written to the destination.
ELT
Extract, load, transform: raw data is loaded first and transformed in the destination.
Batch processing
Handling data in groups at scheduled times.
Streaming
Handling each record soon after it arrives.
Data warehouse
A database designed to hold cleaned data for analysis and reporting.

Common questions

What is the difference between ETL and ELT?

The difference is the order of steps. ETL transforms data before loading it, while ELT loads raw data first and transforms it inside the destination system. ELT is often used when the destination can process large volumes efficiently.

When should a pipeline be batch rather than streaming?

Batch is usually enough when results are needed hourly or daily, as with nightly reports. Streaming suits cases where a delay of minutes would reduce the value of the result, such as fraud detection.

Why do pipelines include data quality checks?

Errors in source data pass through to every later stage. Checks such as row counts, missing values, and valid ranges catch problems early, before they reach reports or models.

Learn this with a tutor

Sidechair's AI tutor will teach this topic in 3D. Join the waitlist for early access.

We'll only email you about Sidechair. Read our privacy policy.