blob: f00be4a79ecd7455571dbe49212f1467e47aeb82 [file] [log] [blame]
:py:mod:`airflow.operators.subdag`
==================================
.. py:module:: airflow.operators.subdag
.. autoapi-nested-parse::
This module is deprecated. Please use :mod:`airflow.utils.task_group`.
The module which provides a way to nest your DAGs and so your levels of complexity.
Module Contents
---------------
Classes
~~~~~~~
.. autoapisummary::
airflow.operators.subdag.SkippedStatePropagationOptions
airflow.operators.subdag.SubDagOperator
.. py:class:: SkippedStatePropagationOptions
Bases: :py:obj:`enum.Enum`
Available options for skipped state propagation of subdag's tasks to parent dag tasks.
.. py:attribute:: ALL_LEAVES
:annotation: = all_leaves
.. py:attribute:: ANY_LEAF
:annotation: = any_leaf
.. py:class:: SubDagOperator(*, subdag: airflow.models.dag.DAG, session: Optional[sqlalchemy.orm.session.Session] = None, conf: Optional[Dict] = None, propagate_skipped_state: Optional[SkippedStatePropagationOptions] = None, **kwargs)
Bases: :py:obj:`airflow.sensors.base.BaseSensorOperator`
This class is deprecated.
Please use `airflow.utils.task_group.TaskGroup`.
This runs a sub dag. By convention, a sub dag's dag_id
should be prefixed by its parent and a dot. As in `parent.child`.
Although SubDagOperator can occupy a pool/concurrency slot,
user can specify the mode=reschedule so that the slot will be
released periodically to avoid potential deadlock.
:param subdag: the DAG object to run as a subdag of the current DAG.
:param session: sqlalchemy session
:param conf: Configuration for the subdag
:type conf: dict
:param propagate_skipped_state: by setting this argument you can define
whether the skipped state of leaf task(s) should be propagated to the
parent dag's downstream task.
.. py:attribute:: ui_color
:annotation: = #555
.. py:attribute:: ui_fgcolor
:annotation: = #fff
.. py:method:: pre_execute(self, context)
This hook is triggered right before self.execute() is called.
.. py:method:: poke(self, context)
Function that the sensors defined while deriving this class should
override.
.. py:method:: post_execute(self, context, result=None)
This hook is triggered right after self.execute() is called.
It is passed the execution context and any results returned by the
operator.