What is a DAG?
Also known as
Directed acyclic graph
A directed acyclic graph (DAG) is a graph in which it’s impossible to get back to any starting node by following the links between nodes. Break the name apart and it explains itself:
- Graph: a set of nodes connected by edges.
- Directed: each edge points one way. A → B does not imply B → A.
- Acyclic: no cycles. Follow the arrows as far as you like and you’ll never return to where you started.
That last property is the useful one. It guarantees you can lay the nodes out in an order where every node comes after everything it depends on — a topological sort — which is exactly what you need to run a sequence of dependent steps.
DAGs in data pipelines
Almost every data pipeline is a DAG, whether or not anyone draws it. Each node is a task — extract from an API, load into staging, transform into a fact table, refresh a rollup — and each edge means “this must finish before that starts.”
A typical shape:
extract_stripe ─┐
├─► load_raw ─► clean_customers ─┐
extract_crm ────┘ ├─► customer_revenue ─► refresh_dashboard
load_raw ─► clean_orders ────┘
Modeling it as a DAG buys you three things:
- Parallelism. Two nodes with no path between them can run at the same time. The orchestrator works this out from the graph rather than you scheduling by hand.
- Correct retries. If
clean_ordersfails, the scheduler knowscustomer_revenueand everything downstream must not run, while unrelated branches can proceed. - Impact analysis. Walk the edges forward from a broken source to see every table and report affected; walk backwards from a wrong number to find where it came from. That backward walk is data lineage.
Orchestration tools such as Airflow, Dagster, and Prefect ask you to define pipelines as DAGs directly — in Airflow the object you write is literally called a DAG. Transformation tools like dbt infer one from the references between models.
Why the acyclic part is non-negotiable
A cycle in a pipeline is a deadlock: A waits for B, B waits for A, nothing runs. Most orchestrators reject cycles at parse time rather than at run time, which is why “circular dependency” is a common error message when a new model accidentally references something downstream of itself.
Where else DAGs show up
The pattern is everywhere once you notice it. Git commit history is a DAG. Build systems and package managers resolve dependencies with one. A spreadsheet’s formula dependencies form a DAG, and the circular-reference warning you get in Excel is the acyclic rule being enforced.
Connecting the output to Metabase
The point of the pipeline is what sits at the end of it: tables in your data warehouse that people can actually query. If you’re assembling one, building a data pipeline walks through the ETL options for getting source systems into a warehouse that Metabase can connect to.
Related terms
Further reading
Put it to work
- Build a data pipeline — Integration
- CI pipeline health dashboard — Dashboard
- Pipeline duration — Metric