Skip to content

What is a DAG in a data pipeline?

A DAG organizes the tasks in a data workflow into a graph without cycles, making their dependencies explicit and showing which tasks can run in parallel.

A DAG, or directed acyclic graph, is a model that organizes workflow tasks by their dependencies, with no path that loops back to where it started. In a data pipeline (a sequence of operations on data), each node represents a task and each arrow indicates which task must precede another. If two extractions are independent, they can start together; a transformation using both results must wait. The absence of cycles rules out impossible orderings, such as A before B and B before A. The structure describes constraints, but does not itself guarantee speed or results: execution also requires a system to run the tasks, sufficient resources, and rules for handling errors. The Python documentation on graphs explains how to find a valid order and detect cycles. The model also has uses beyond data pipelines; this entry focuses on choosing and managing business workflows.

See also: Apache AirflowApache Airflow is an open-source platform for scheduling and monitoring workflows defined in Python, including task dependencies and failure handling.

From a script to a graph: what changes

A sequential script runs instructions in a fixed order and may suffice for a simple process. A DAG declares ordering constraints between tasks; when only the necessary ones are declared, ready tasks can run concurrently, provided the engine and resources allow it. Not every graph offers the same benefit: a chain in which each step waits for its predecessor remains sequential. More concurrency can also strain source systems and needs appropriate limits.

The graph does not necessarily specify what happens after a failure. According to the Argo Workflows documentation, the default setting stops scheduling new tasks after a failure and waits for those already running; turning that option off lets independent branches continue. That behavior belongs to the engine and its configuration; DAG theory is silent on it.

An enterprise example

A company prepares a weekly report by combining extracts from its CRM, ERP, and online store. The extractions are independent tasks; consolidation starts only after all three have produced the required data. If the ERP does not respond, the report is stuck. The other extractions, which started together, can still finish: under Argo's default setting, tasks already underway run to completion. The graph shows which result is missing, but the person responsible must decide whether to wait, retry, or, if the process allows, publish a partial result.

Rerunning a task needs care: according to Apache Airflow's guidance, every retry should produce the same outcome, whereas a repeated insert can duplicate rows. Making retries safe is the subject of idempotency and backfill.

Why it matters for decision makers

Before buying or adopting an orchestrator (the system that coordinates tasks), ask to see it run on your own workflow: which branches can proceed together, what happens if one fails, and how to resume without duplicating data. Also pin down the concurrency limits and who steps in when a report is not ready.

In Apache Airflow, a DAG also includes operational information such as scheduling and retry settings, not only dependencies, so the project documentation distinguishes the mathematical model from Airflow's DAG object. A DAG, by itself, does not prove platform maturity: to evaluate the whole process, turn to DataOps, which also covers the practices and responsibilities of working with data.

Frequently asked questions

The graph shows which tasks are independent; parallel execution depends on the engine, its configuration, and the resources available.

It depends on the engine's rules: independent branches may keep running, or the engine may stop scheduling new tasks.
  • Apache AirflowApache Airflow is an open-source platform for scheduling and monitoring workflows defined in Python, including task dependencies and failure handling.
  • DataOpsDevOps discipline applied to data pipelines: versioning, testing, CI/CD and monitoring on data flows.
  • Data lineageData lineage records where data originates, how it is transformed and which systems use it, making dependencies between tables, columns and reports visible.
  • Durable executionA workflow survives crashes and restarts by resuming from the last saved step, not from the beginning.

See it in the universe

If it touches your company's data, getting that data in order is the first thing I do.

See Data Foundations

Or write to me.