airflow.operators.trigger_dagrun

Module Contents

Bases: airflow.models.BaseOperatorLink

Operator link for TriggerDagRunOperator. It allows users to access DAG triggered by task using TriggerDagRunOperator.

name = Triggered DAG[source]
class airflow.operators.trigger_dagrun.TriggerDagRunOperator(*, trigger_dag_id: str, conf: Optional[Dict] = None, execution_date: Optional[Union[str, datetime.datetime]] = None, reset_dag_run: bool = False, wait_for_completion: bool = False, poke_interval: int = 60, allowed_states: Optional[List] = None, failed_states: Optional[List] = None, **kwargs)[source]

Bases: airflow.models.BaseOperator

Triggers a DAG run for a specified dag_id

Parameters
  • trigger_dag_id (str) – the dag_id to trigger (templated)

  • conf (dict) – Configuration for the DAG run

  • execution_date (str or datetime.datetime) – Execution date for the dag (templated)

  • reset_dag_run (bool) – Whether or not clear existing dag run if already exists. This is useful when backfill or rerun an existing dag run. When reset_dag_run=False and dag run exists, DagRunAlreadyExists will be raised. When reset_dag_run=True and dag run exists, existing dag run will be cleared to rerun.

  • wait_for_completion (bool) – Whether or not wait for dag run completion. (default: False)

  • poke_interval (int) – Poke interval to check dag run status when wait_for_completion=True. (default: 60)

  • allowed_states (list) – list of allowed states, default is ['success']

  • failed_states (list) – list of failed or dis-allowed states, default is None

template_fields = ['trigger_dag_id', 'execution_date', 'conf'][source]
ui_color = #ffefeb[source]

Return operator extra links

execute(self, context: Dict)[source]

Was this entry helpful?