TriggerDagRun
TriggerDagRun
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
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') }}"
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.000000000
- Format:
duration
The maximum total wait duration.
options
- Type: HttpInterface-RequestOptions
- Dynamic: ❌
- Required: ❌
Request options
pollFrequency
- Type: string
- Dynamic: ❌
- Required: ❌
- Default:
1.000000000
- 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: ❌
DAG ID
dagRunId
- Type: string
- Required: ❌
DAG run ID
ended
- Type: string
- Required: ❌
- Format:
date-time
DAG run completed date
started
- Type: string
- Required: ❌
- Format:
date-time
DAG run started date
state
- Type: string
- Required: ❌
State
Definitions
java.nio.charset.Charset
Properties
io.kestra.plugin.core.http.HttpInterface-RequestOptions
Properties
basicAuthPassword
- Type: string
- Dynamic: ✔️
- Required: ❌
The password for HTTP basic authentication.
basicAuthUser
- Type: string
- Dynamic: ✔️
- Required: ❌
The username for HTTP basic authentication.
connectTimeout
- Type: string
- Dynamic: ❌
- Required: ❌
- Format:
duration
The time allowed to establish a connection to the server before failing.
connectionPoolIdleTimeout
- Type: string
- Dynamic: ❌
- Required: ❌
- Default:
0.0
- Format:
duration
The time an idle connection can remain in the client's connection pool before being closed.
defaultCharset
- Type: Charset
- Dynamic: ❌
- Required: ❌
- Default:
UTF-8
The default charset for the request.
followRedirects
- Type: boolean
- Dynamic: ❌
- Required: ❌
- Default:
true
Whether redirects should be followed automatically.
logLevel
- Type: string
- Dynamic: ❌
- Required: ❌
- Possible Values:
ALL
TRACE
DEBUG
INFO
WARN
ERROR
OFF
NOT_SPECIFIED
The log level for the HTTP client.
maxContentLength
- Type: integer
- Dynamic: ❌
- Required: ❌
- Default:
10485760
The maximum content length of the response.
proxyAddress
- Type: string
- Dynamic: ✔️
- Required: ❌
The address of the proxy server.
proxyPassword
- Type: string
- Dynamic: ✔️
- Required: ❌
The password for proxy authentication.
proxyPort
- Type: integer
- Dynamic: ❌
- Required: ❌
The port of the proxy server.
proxyType
- Type: string
- Dynamic: ❌
- Required: ❌
- Default:
DIRECT
- Possible Values:
DIRECT
HTTP
SOCKS
The type of proxy to use.
proxyUsername
- Type: string
- Dynamic: ✔️
- Required: ❌
The username for proxy authentication.
readIdleTimeout
- Type: string
- Dynamic: ❌
- Required: ❌
- Default:
300.000000000
- Format:
duration
The time allowed for a read connection to remain idle before closing it.
readTimeout
- Type: string
- Dynamic: ❌
- Required: ❌
- Default:
10.000000000
- Format:
duration
The maximum time allowed for reading data from the server before failing.
Was this page helpful?