You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/apache-airflow/concepts/dags.rst
+41-2
Original file line number
Diff line number
Diff line change
@@ -605,8 +605,47 @@ Some other tips when using SubDAGs:
605
605
606
606
See ``airflow/example_dags`` for a demonstration.
607
607
608
-
Note that :doc:`pools` are *not honored* by :class:`~airflow.operators.subdag.SubDagOperator`, and so
609
-
resources could be consumed by SubdagOperators beyond any limits you may have set.
608
+
609
+
.. note::
610
+
611
+
Parallelism is *not honored* by :class:`~airflow.operators.subdag.SubDagOperator`, and so resources could be consumed by SubdagOperators beyond any limits you may have set.
612
+
613
+
614
+
615
+
TaskGroups vs SubDAGs
616
+
----------------------
617
+
618
+
SubDAGs, while serving a similar purpose as TaskGroups, introduces both performance and functional issues due to its implementation.
619
+
620
+
* The SubDagOperator starts a BackfillJob, which ignores existing parallelism configurations potentially oversubscribing the worker environment.
621
+
* SubDAGs have their own DAG attributes. When the SubDAG DAG attributes are inconsistent with its parent DAG, unexpected behavior can occur.
622
+
* Unable to see the "full" DAG in one view as SubDAGs exists as a full fledged DAG.
623
+
* SubDAGs introduces all sorts of edge cases and caveats. This can disrupt user experience and expectation.
624
+
625
+
TaskGroups, on the other hand, is a better option given that it is purely a UI grouping concept. All tasks within the TaskGroup still behave as any other tasks outside of the TaskGroup.
626
+
627
+
You can see the core differences between these two constructs.
0 commit comments