Module Contents

class airflow.operators.dagrun_operator.DagRunOrder(run_id=None, payload=None)[source]

Bases: object

class airflow.operators.dagrun_operator.TriggerDagRunOperator(trigger_dag_id, python_callable=None, execution_date=None, *args, **kwargs)[source]

Bases: airflow.models.BaseOperator

Triggers a DAG run for a specified dag_id

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

  • python_callable (python callable) – a reference to a python function that will be called while passing it the context object and a placeholder object obj for your callable to fill and return if you want a DagRun created. This obj object contains a run_id and payload attribute that you can modify in your function. The run_id should be a unique identifier for that DAG run, and the payload has to be a picklable object that will be made available to your tasks while executing that DAG run. Your function header should look like def foo(context, dag_run_obj):

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

template_fields = ['trigger_dag_id', 'execution_date'][source]
ui_color = #ffefeb[source]
execute(self, context)[source]