yaml
type: "io.kestra.plugin.airflow.dags.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.
Examples
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
baseUrl
- Type: string
- Dynamic: ✔️
- Required: ✔️
The base URL of the Airflow instance
dagId
- Type: string
- Dynamic: ✔️
- Required: ✔️
The ID of the DAG to trigger
body
- Type: object
- Dynamic: ✔️
- Required: ❌
Overrides the default configuration payload
headers
- Type: object
- SubType: string
- Dynamic: ❌
- Required: ❌
Adds custom headers
maxDuration
- Type: string
- Dynamic: ❌
- Required: ❌
- Default:
3600
- Format:
duration
The maximum total wait duration.
options
- Type: HttpInterface-RequestOptions
- Dynamic: ❌
- Required: ❌
Request options
pollFrequency
- Type: string
- Dynamic: ❌
- Required: ❌
- Default:
1
- Format:
duration
Specify how often the task should poll for the DAG run status.
wait
- Type: boolean
- Dynamic: ❌
- Required: ❌
- Default:
false
Whether task should wait for the DAG to run to completion
Default value is false
Outputs
dagId
- Type: string
- Required: ❌
dagRunId
- Type: string
- Required: ❌
ended
- Type: string
- Required: ❌
- Format:
date-time
started
- Type: string
- Required: ❌
- Format:
date-time
state
- Type: string
- Required: ❌
Definitions
java.nio.charset.Charset
io.kestra.plugin.core.http.HttpInterface-RequestOptions
basicAuthPassword
- Type: string
- Dynamic: ✔️
- Required: ❌
basicAuthUser
- Type: string
- Dynamic: ✔️
- Required: ❌
connectTimeout
- Type: string
- Dynamic: ❌
- Required: ❌
- Format:
duration
connectionPoolIdleTimeout
- Type: string
- Dynamic: ❌
- Required: ❌
- Default:
0
- Format:
duration
defaultCharset
- Type: Charset
- Dynamic: ❌
- Required: ❌
- Default:
UTF-8
followRedirects
- Type: boolean
- Dynamic: ❌
- Required: ❌
- Default:
true
logLevel
- Type: string
- Dynamic: ❌
- Required: ❌
- Possible Values:
ALL
TRACE
DEBUG
INFO
WARN
ERROR
OFF
NOT_SPECIFIED
maxContentLength
- Type: integer
- Dynamic: ❌
- Required: ❌
- Default:
10485760
proxyAddress
- Type: string
- Dynamic: ✔️
- Required: ❌
proxyPassword
- Type: string
- Dynamic: ✔️
- Required: ❌
proxyPort
- Type: integer
- Dynamic: ❌
- Required: ❌
proxyType
- Type: string
- Dynamic: ❌
- Required: ❌
- Default:
DIRECT
- Possible Values:
DIRECT
HTTP
SOCKS
proxyUsername
- Type: string
- Dynamic: ✔️
- Required: ❌
readIdleTimeout
- Type: string
- Dynamic: ❌
- Required: ❌
- Default:
300
- Format:
duration
readTimeout
- Type: string
- Dynamic: ❌
- Required: ❌
- Default:
10
- Format:
duration