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.BaseOperator
Triggers 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
context
object and a placeholder objectobj
for your callable to fill and return if you want a DagRun created. Thisobj
object contains arun_id
andpayload
attribute that you can modify in your function. Therun_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 likedef foo(context, dag_run_obj):
execution_date (str or datetime.datetime) – Execution date for the dag (templated)