Airflow & DAGs · Advanced Development

TaskGroups vs SubDAGs

Mediumtaskgroupsubdag

Interview question

What is the difference between TaskGroups and SubDAGs?

How to answer

TaskGroup

Groups related tasks visually for readability:

SubDAG

A nested inside another DAG. Historically awkward for scheduling and resources; generally deprecated/legacy, so avoid it. Prefer TaskGroup.