TriggerDagRun​Trigger​Dag​Run

Trigger an Airflow DAG with custom inputs.

Launch a DAG run, optionally wait for its completion, and return the final state of the DAG run.

yaml
type: "io.kestra.plugin.airflow.dags.TriggerDagRun"

Trigger a DAG run with custom inputs, and authenticate with basic authentication

yaml
id: airflow
namespace: company.team

tasks:
  - id: run_dag
    type: io.kestra.plugin.airflow.dags.TriggerDagRun
    baseUrl: http://host.docker.internal:8080
    dagId: example_astronauts
    wait: true
    pollFrequency: PT1S
    options:
      basicAuthUser: "{{ secret('AIRFLOW_USERNAME') }}"
      basicAuthPassword: "{{ secret('AIRFLOW_PASSWORD') }}"
    body:
      conf:
        source: kestra
        namespace: "{{ flow.namespace }}"
        flow: "{{ flow.id }}"
        task: "{{ task.id }}"
        execution: "{{ execution.id }}"

Trigger a DAG run with custom inputs, and authenticate with a Bearer token

yaml
id: airflow_header_authorization
namespace: company.team

tasks:
  - id: run_dag
    type: io.kestra.plugin.airflow.dags.TriggerDagRun
    baseUrl: http://host.docker.internal:8080
    dagId: example_astronauts
    wait: true
    headers:
      authorization: "Bearer {{ secret('AIRFLOW_TOKEN') }}"
Properties

The base URL of the Airflow instance

The ID of the DAG to trigger

Overrides the default configuration payload

Adds custom headers

Default PT1H
Format duration

The maximum total wait duration.

Request options

Default PT1S
Format duration

Specify how often the task should poll for the DAG run status.

Default false

Whether task should wait for the DAG to run to completion

Default value is false

DAG ID

DAG run ID

Format date-time

DAG run completed date

Format date-time

DAG run started date

State

Format duration

The time allowed to establish a connection to the server before failing.

Default PT5M
Format duration

The time allowed for a read connection to remain idle before closing it.

The password for HTTP basic authentication.

The username for HTTP basic authentication.

Default false

If true, allow a failed response code (response code >= 400)

SubType integer

List of response code allowed for this request

The authentification to use.

Default UTF-8

The default charset for the request.

Default true

Whether redirects should be followed automatically.

SubType string
Possible Values
REQUEST_HEADERSREQUEST_BODYRESPONSE_HEADERSRESPONSE_BODY

The enabled log.

The proxy configuration.

The SSL request options

The timeout configuration.

The address of the proxy server.

The password for proxy authentication.

The port of the proxy server.

Default DIRECT
Possible Values
DIRECTHTTPSOCKS

The type of proxy to use.

The username for proxy authentication.

Whether to disable checking of the remote SSL certificate.

Only applies if no trust store is configured. Note: This makes the SSL connection insecure and should only be used for testing. If you are using a self-signed certificate, set up a trust store instead.

The token for bearer token authentication.