airflow.models.taskmixin

Module Contents

Classes

TaskMixin

Mixing implementing common chain methods like >> and <<.

class airflow.models.taskmixin.TaskMixin[source]

Mixing implementing common chain methods like >> and <<.

In the following functions we use: Task = Union[BaseOperator, XComArg] No type annotations due to cyclic imports.

property roots(self)[source]

Should return list of root operator List[BaseOperator]

property leaves(self)[source]

Should return list of leaf operator List[BaseOperator]

abstract set_upstream(self, other: Union[TaskMixin, Sequence[TaskMixin]])[source]

Set a task or a task list to be directly upstream from the current task.

abstract set_downstream(self, other: Union[TaskMixin, Sequence[TaskMixin]])[source]

Set a task or a task list to be directly downstream from the current task.

update_relative(self, other: TaskMixin, upstream=True) None[source]

Update relationship information about another TaskMixin. Default is no-op. Override if necessary.

__lshift__(self, other: Union[TaskMixin, Sequence[TaskMixin]])[source]

Implements Task << Task

__rshift__(self, other: Union[TaskMixin, Sequence[TaskMixin]])[source]

Implements Task >> Task

__rrshift__(self, other: Union[TaskMixin, Sequence[TaskMixin]])[source]

Called for Task >> [Task] because list don’t have __rshift__ operators.

__rlshift__(self, other: Union[TaskMixin, Sequence[TaskMixin]])[source]

Called for Task << [Task] because list don’t have __lshift__ operators.

Was this entry helpful?