elaspog
elaspog

Reputation: 1709

How to change Run IDs for DAG executions triggered via REST API of Airflow?

We are triggering DAGs in Google Cloud Composer via Airflow's REST interface.
https://airflow.apache.org/docs/apache-airflow/stable/deprecated-rest-api-ref.html

We can see that the DAGs triggered this way get Run IDs with manual__ prefix, e.g.:

Run Id
manual__2021-06-25T05.52.31.103391+00.00

When we trigger these DAGs from Cloud Functions want to differentiate these executions from the manually executed DAGs (triggered from UI) or from automatically scheduled executions (triggered by cron/scheduling criteria).

Question: Is it possible to mark the executions triggered via REST API other than manual__?

Sidenote: currently we are using Composer with Airflow 1.x, but we are planning to change to Airflow 2.x as soon as the Composer supports it.

Upvotes: 3

Views: 741

Answers (1)

Elad Kalif
Elad Kalif

Reputation: 15979

It can not be changed.

Airflow has Enum of DagRunType with 3 options: backfill, scheduled & manual. The value is set by Airflow itself.

Upvotes: 4

Related Questions