Replies: 1 comment 5 replies
|
Depends which context you are running it with. You need to show the whole DAG you have because it does not look you used it properly ('trigger_dag_id' is a templated field so it should work as you expected and it has been in templated_fields since 2018 or so as I checked). You must have been doing something wrong in your DAG definition. |
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Airflow version: 2.1.4
I would like to trigger a dag with the name stored in XCom.
I tried the following:
re_triggered = TriggerDagRunOperator( task_id='re_triggered', trigger_dag_id="{{ ti.xcom_pull('redaction_dag', key='redaction_pipeline') }}", execution_date=datetime.now(timezone.utc), reset_dag_run=True, wait_for_completion=False, dag=dag )I got the following error:
DAG "{{ ti.xcom_pull('redaction_dag', key='redaction_pipeline') }}" seems to be missing from DagBag.
Thank you!
All reactions