DAG (Directed Acyclic Graph)
PronunciationDAG
Definition
A DAG is a graph whose edges have a direction and which has no cycles: following the arrows you can never return to where you started. It is the natural shape of tasks and their dependencies.
Where you hear it
In Apache Airflow and CI pipelines, build systems, Git commit history and data processing frameworks.
Examples
Each Airflow workflow is defined as a DAG of tasks.
Git history is a DAG of commits.
The pipeline is a DAG: the deploy step waits for the build and the tests.
Common mistake
Adding a dependency that points back. That creates a cycle and the DAG is no longer valid.
Don't confuse with
A tree, which is a DAG where each node has exactly one parent. A DAG node may have several parents.
Say it at work
- In a meeting or chat
Model the pipeline as a DAG.
- In an email or ticket
Check for cycles before running.
Keep exploring
More in Programming Fundamentals