airflow.operators.dagrun_operator¶
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.BaseOperatorTriggers a DAG run for a specified
dag_id- Parameters
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
contextobject and a placeholder objectobjfor your callable to fill and return if you want a DagRun created. Thisobjobject contains arun_idandpayloadattribute that you can modify in your function. Therun_idshould 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 likedef foo(context, dag_run_obj):execution_date (str or datetime.datetime) – Execution date for the dag (templated)