airflow.decorators.branch_python

Module Contents

Functions

branch_task([python_callable, multiple_outputs])

Wrap a python function into a BranchPythonOperator.

airflow.decorators.branch_python.branch_task(python_callable=None, multiple_outputs=None, **kwargs)[source]

Wrap a python function into a BranchPythonOperator.

For more information on how to use this operator, take a look at the guide: Branching

Accepts kwargs for operator kwarg. Can be reused in a single DAG.

Parameters
  • python_callable (Callable | None) – Function to decorate

  • multiple_outputs (bool | None) – if set, function return value will be unrolled to multiple XCom values. Dict will unroll to xcom values with keys as XCom keys. Defaults to False.

Was this entry helpful?