0
0
Apache Airflowdevops~5 mins

DAG concept (Directed Acyclic Graph) in Apache Airflow - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does DAG stand for in Airflow?
DAG stands for Directed Acyclic Graph. It is a collection of tasks with a defined order and no cycles.
Click to reveal answer
beginner
Why must a DAG be acyclic?
A DAG must be acyclic to avoid infinite loops in task execution. This ensures tasks run in a clear, one-way order.
Click to reveal answer
beginner
In Airflow, what does the direction in a DAG represent?
The direction shows the order tasks should run. An arrow from Task A to Task B means Task A runs before Task B.
Click to reveal answer
intermediate
How does Airflow use DAGs to manage workflows?
Airflow uses DAGs to define workflows as tasks connected by dependencies. It schedules and runs tasks following the DAG order.
Click to reveal answer
intermediate
What happens if a cycle is introduced in an Airflow DAG?
Airflow will raise an error because cycles cause tasks to depend on themselves, making execution impossible.
Click to reveal answer
What is a key property of a DAG in Airflow?
AIt has only one task
BIt allows tasks to run in any order
CIt repeats tasks infinitely
DIt has no cycles
In a DAG, what does an arrow from Task A to Task B mean?
ATask A runs before Task B
BTasks run at the same time
CTask B runs before Task A
DTasks are unrelated
Why does Airflow reject DAGs with cycles?
ACycles speed up execution
BCycles reduce task dependencies
CCycles cause infinite loops
DCycles are allowed in Airflow
What does Airflow use DAGs for?
ATo define and schedule workflows
BTo store data
CTo create user interfaces
DTo monitor servers
Which of these is NOT true about DAGs?
AThey have directed edges
BThey can have cycles
CThey define task order
DThey are used in Airflow
Explain what a Directed Acyclic Graph (DAG) is and why it is important in Airflow.
Think about how tasks depend on each other and why loops would cause problems.
You got /4 concepts.
    Describe what happens if you try to create a cycle in an Airflow DAG and why Airflow prevents it.
    Consider what would happen if tasks kept waiting for each other forever.
    You got /4 concepts.