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.
Functions
should_run (**kwargs)
|
Determine which empty_task should be run based on if the logical date minute is even or odd. |
Module Contents
-
airflow.example_dags.example_branch_python_dop_operator_3.should_run(**kwargs)[source]
Determine which empty_task should be run based on if the logical 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 = 'empty_task_1'[source]