How can I set wait_for_completion dynamically while using TriggerDagRunOperator?
#31117
|
I want to control trigger_dag_2 = TriggerDagRunOperator(
task_id="trigger_trigger_dag_2,
trigger_dag_id="dag_2",
wait_for_completion=str_to_bool("{{ dag_run.conf.get('wait_for_completion')}}"),
poke_interval=10,
)The |
Replies: 1 comment 5 replies
|
Okay so I think why it is not working properly is because only certain arguments for an operator can use template values. For If this is the reason can we add |
Okay so I think why it is not working properly is because only certain arguments for an operator can use template values. For
TriggerDagRunOperatorit istemplate_fields: Sequence[str] = ("trigger_dag_id", "trigger_run_id", "execution_date", "conf")so I am not able to setwait_for_completioncorrectly.If this is the reason can we add
wait_for_completionto template_fields` ?