

This is the main method to derive when creating an operator.Ĭontext is the same dictionary used as when rendering jinja templates. Template_fields : Sequence = ('trigger_dag_id', 'trigger_run_id', 'execution_date', 'conf') ¶ template_fields_renderers ¶ ui_color = '#ffefeb' ¶ operator_extra_links ¶ execute ( context ) ¶ įailed_states ( list | None) – List of failed or dis-allowed states, default is None.ĭeferrable ( bool) – If waiting for completion, whether or not to defer the task until done, Poke_interval ( int) – Poke interval to check dag run status when wait_for_completion=True.Īllowed_states ( list | None) – List of allowed states, default is. Wait_for_completion ( bool) – Whether or not wait for dag run completion. When reset_dag_run=True and dag run exists, existing dag run will be cleared to rerun. When reset_dag_run=False and dag run exists, DagRunAlreadyExists will be raised. This only resets (not recreates) the dag run.ĭag run conf is immutable and will not be reset on rerun of an existing dag run. This is useful when backfill or rerun an existing dag run. Reset_dag_run ( bool) – Whether clear existing dag run if already exists. If not provided, a run ID will be automatically generated.Ĭonf ( dict | None) – Configuration for the DAG run (templated).Įxecution_date ( str | datetime.datetime | None) – Execution date for the dag (templated). Trigger_run_id ( str | None) – The run ID to use for the triggered DAG run (templated). Trigger_dag_id ( str) – The dag_id to trigger (templated). Triggers a DAG run for a specified dag_id. TriggerDagRunOperator ( *, trigger_dag_id, trigger_run_id = None, conf = None, execution_date = None, reset_dag_run = False, wait_for_completion = False, poke_interval = 60, allowed_states = None, failed_states = None, deferrable = False, ** kwargs ) ¶īases: Ti_key ( ) – TaskInstance ID to return link for. Operator ( ) – The Airflow operator object this link is associated to. Note: The old signature of this function was (self, operator, dttm: datetime). name = 'Triggered DAG' ¶ get_link ( operator, *, ti_key ) ¶ It allows users to access DAG triggered by task using TriggerDagRunOperator. I found a way in the documentation to triggering it from a cloud function. XCOM_RUN_ID = 'trigger_run_id' ¶ class _dagrun. Wilson Lian i would like to trigger my airflow DAG from a python script. XCOM_EXECUTION_DATE_ISO = 'trigger_execution_date_iso' ¶ _dagrun. What is not part of the Public Interface of Apache Airflow?Ī_dagrun.Using Public Interface to integrate with external services and applications.

Using Public Interface to extend Airflow capabilities.TriggerDagRunOperator.execute_complete().TriggerDagRunOperator.operator_extra_links.TriggerDagRunOperator.template_fields_renderers.Using the Public Interface for DAG Authors.
