Complete the code to set the trigger rule so the task runs only if all upstream tasks succeed.
task = PythonOperator(task_id='task1', python_callable=my_func, trigger_rule='[1]')
The all_success trigger rule makes the task run only if all upstream tasks succeed.
Complete the code to set the trigger rule so the task runs if at least one upstream task succeeds.
task = PythonOperator(task_id='task2', python_callable=my_func, trigger_rule='[1]')
The one_success trigger rule runs the task if any one upstream task succeeds.
Fix the error in the code to make the task run only if no upstream tasks have failed.
task = PythonOperator(task_id='task3', python_callable=my_func, trigger_rule='[1]')
The none_failed trigger rule runs the task if no upstream tasks have failed, even if some are skipped.
Fill both blanks to create a PythonOperator that runs if all upstream tasks succeed and has a task_id of 'final_task'.
task = PythonOperator(task_id='[1]', python_callable=my_func, trigger_rule='[2]')
Setting task_id to 'final_task' names the task, and trigger_rule='all_success' ensures it runs only if all upstream tasks succeed.
Fill all three blanks to create a PythonOperator with task_id 'check_task', that runs if no upstream tasks failed, and uses a callable named 'check_status'.
task = PythonOperator(task_id='[1]', python_callable=[2], trigger_rule='[3]')
The task is named 'check_task', uses the function 'check_status', and runs only if no upstream tasks failed using the 'none_failed' trigger rule.