Stefan Papp
Stefan Papp

Reputation: 2255

Trigger Airflow DAG in another environment

I am running Airflow on one server. Within my DAGs and Tasks, there are cases in which I need to trigger DAGs which are maintained in a different Airflow installation on another server.

Is there a AirflowOperator similar to operators such as a DatabricksRunNowOperator? I checked already https://airflow.apache.org/docs/apache-airflow-providers/packages-ref.html. I have not found anything.

Upvotes: 0

Views: 2081

Answers (1)

Josh Fell
Josh Fell

Reputation: 3589

You could take advantage of the Airflow REST API and trigger a DAG run. The SimpleHttpOperator can help with that out of the box in Airflow, using the HttpHook inside a PythonOperator, or a TaskFlow function with a callable that you write yourself, etc.

The main takeaway is the Airflow REST API can help here and you can send a POST request in a few different ways however you are comfortable doing so.

Upvotes: 3

Related Questions