| :py:mod:`airflow.models.taskmixin` |
| ================================== |
| |
| .. py:module:: airflow.models.taskmixin |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.models.taskmixin.TaskMixin |
| |
| |
| |
| |
| .. py:class:: TaskMixin |
| |
| Mixing implementing common chain methods like >> and <<. |
| |
| In the following functions we use: |
| Task = Union[BaseOperator, XComArg] |
| No type annotations due to cyclic imports. |
| |
| .. py:method:: roots(self) |
| :property: |
| |
| Should return list of root operator List[BaseOperator] |
| |
| |
| .. py:method:: leaves(self) |
| :property: |
| |
| Should return list of leaf operator List[BaseOperator] |
| |
| |
| .. py:method:: set_upstream(self, other: Union[TaskMixin, Sequence[TaskMixin]]) |
| :abstractmethod: |
| |
| Set a task or a task list to be directly upstream from the current task. |
| |
| |
| .. py:method:: set_downstream(self, other: Union[TaskMixin, Sequence[TaskMixin]]) |
| :abstractmethod: |
| |
| Set a task or a task list to be directly downstream from the current task. |
| |
| |
| .. py:method:: update_relative(self, other: TaskMixin, upstream=True) -> None |
| |
| Update relationship information about another TaskMixin. Default is no-op. |
| Override if necessary. |
| |
| |
| .. py:method:: __lshift__(self, other: Union[TaskMixin, Sequence[TaskMixin]]) |
| |
| Implements Task << Task |
| |
| |
| .. py:method:: __rshift__(self, other: Union[TaskMixin, Sequence[TaskMixin]]) |
| |
| Implements Task >> Task |
| |
| |
| .. py:method:: __rrshift__(self, other: Union[TaskMixin, Sequence[TaskMixin]]) |
| |
| Called for Task >> [Task] because list don't have __rshift__ operators. |
| |
| |
| .. py:method:: __rlshift__(self, other: Union[TaskMixin, Sequence[TaskMixin]]) |
| |
| Called for Task << [Task] because list don't have __lshift__ operators. |
| |
| |
| |