TriggerDagRun
Trigger an Airflow DAG with custom inputs and wait for its completion.
Launch a DAG run, optionally wait for its completion and return the final state of the DAG run.
type: "io.kestra.plugin.airflow.dags.TriggerDagRun"
Trigger a DAG run with custom inputs, and authenticate with basic authentication
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
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') }}"
YES
The base URL of the Airflow instance
YES
The ID of the DAG to trigger
YES
Overrides the default configuration payload
YES
Adds custom headers
YES
PT1H
duration
The maximum total wait duration.
NO
Request options
YES
PT1S
duration
Specify how often the task should poll for the DAG run status.
YES
false
DAG ID
DAG run ID
date-time
DAG run completed date
date-time
DAG run started date
State
YES
duration
The time allowed to establish a connection to the server before failing.
YES
PT5M
duration
The time allowed for a read connection to remain idle before closing it.
YES
The password for HTTP basic authentication.
YES
The username for HTTP basic authentication.
YES
false
NO
NO
The password for HTTP basic authentication.
NO
The username for HTTP basic authentication.
NO
duration
The time allowed to establish a connection to the server before failing.
NO
duration
The time an idle connection can remain in the client's connection pool before being closed.
YES
UTF-8
YES
true
NO
ALL
TRACE
DEBUG
INFO
WARN
ERROR
OFF
NOT_SPECIFIED
The log level for the HTTP client.
NO
REQUEST_HEADERS
REQUEST_BODY
RESPONSE_HEADERS
RESPONSE_BODY
The enabled log.
NO
The maximum content length of the response.
NO
The proxy configuration.
NO
The address of the proxy server.
NO
The password for proxy authentication.
NO
The port of the proxy server.
NO
DIRECT
HTTP
SOCKS
The type of proxy to use.
NO
The username for proxy authentication.
NO
duration
The time allowed for a read connection to remain idle before closing it.
NO
duration
The maximum time allowed for reading data from the server before failing.
NO
The SSL request options
NO
The timeout configuration.
YES
The address of the proxy server.
YES
The password for proxy authentication.
YES
YES
The username for proxy authentication.
YES
YES
The token for bearer token authentication.