Home › Interview Questions › Can you explain what a DAG in Airflow is?

Can you explain what a DAG in Airflow is?

🟢 Easy Conceptual Fresher level
1Times asked
Oct 2026Last seen
Oct 2026First seen

💡 Model Answer

A DAG, or Directed Acyclic Graph, is the fundamental unit of scheduling in Airflow. It is a Python object that represents a collection of tasks and their dependencies. Each task is an instance of an Operator (e.g., BashOperator, PythonOperator). The DAG defines the execution order by specifying which tasks must run before others, ensuring there are no cycles (hence acyclic). It also contains metadata such as the schedule_interval, start_date, default_args, and tags. When Airflow’s scheduler runs, it looks at the DAG definition, determines which tasks are ready to run based on dependencies and timing, and dispatches them to the executor. The DAG file is typically a simple Python script that imports the DAG class, sets default arguments, creates a DAG instance, and defines tasks and their relationships.

This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.

🎤 Get questions like this answered in real-time

Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers on a discreet on-screen overlay.

Get Assisting AI — Starts at ₹500