airflow.example_dags.example_branch_python_dop_operator_3

Example DAG demonstrating the usage of @task.branch TaskFlow API decorator with depends_on_past=True, where tasks may be run or skipped on alternating runs.

Module Contents

Functions

should_run(**kwargs)

Determine which empty_task should be run based on if the execution date minute is even or odd.

Attributes

cond

airflow.example_dags.example_branch_python_dop_operator_3.should_run(**kwargs)[source]

Determine which empty_task should be run based on if the execution date minute is even or odd.

Parameters

kwargs (dict) – Context

Returns

Id of the task to run

Return type

str

airflow.example_dags.example_branch_python_dop_operator_3.cond[source]

Was this entry helpful?