
Dbt Cloud TriggerRun
CertifiedStart a dbt Cloud job run
Dbt Cloud TriggerRun
Start a dbt Cloud job run
Triggers a dbt Cloud job via API. Optionally waits for completion to stream logs, surface dynamic steps, and collect run results; wait defaults to true with 5s polling and a 60m cap.
type: io.kestra.plugin.dbt.cloud.TriggerRunExamples
id: dbt_trigger_job_run
namespace: company.team
tasks:
- id: trigger_run
type: io.kestra.plugin.dbt.cloud.TriggerRun
accountId: "12345"
token: "{{ secret('DBT_TOKEN') }}"
jobId: "67890"
Customize the retry policy of the dbt Cloud API calls.
id: dbt_trigger_job_run_with_retry
namespace: company.team
tasks:
- id: trigger_run
type: io.kestra.plugin.dbt.cloud.TriggerRun
accountId: "12345"
token: "{{ secret('DBT_TOKEN') }}"
jobId: "67890"
options:
retry:
type: constant
interval: PT2S
maxAttempts: 5
Properties
accountId *string
Numeric ID of the account
The numeric dbt Cloud account ID, visible in the account settings and in the dbt Cloud URL.
jobId *string
Job ID
Numeric dbt Cloud job identifier to trigger.
token *string
API token
A dbt Cloud API token (a Service Account token or a Personal Access token); sent as a Bearer token.
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150baseUrl string
https://cloud.getdbt.comBase URL to select the tenant
The access URL for your dbt Cloud account. Regional and cell-based accounts use a URL of the form ACCOUNT_PREFIX.REGION.dbt.com, not the legacy cloud.getdbt.com host, which no longer resolves tokens for these accounts and returns a 401 error even with a valid token.
cause string
Triggered by Kestra.Run cause
Reason passed to dbt Cloud. Defaults to "Triggered by Kestra."
dbtVersionOverride string
dbt version override
dbt version string to force for this run.
generateDocsOverride booleanstring
Generate docs override
Whether the run builds docs even if the job is configured otherwise.
gitBranch string
Git branch override
Branch to checkout when triggering the job.
gitSha string
Git SHA override
Specific commit to checkout before the run.
maxDuration string
PT1HMax wait duration
Ceiling for waiting on job completion. Default 60m.
options
The HTTP client configuration
Set options.retry to customize the retry policy of every call to dbt Cloud. When options.retry is left unset, an Exponential policy built from the deprecated maxRetries and initialDelayMs is applied. User-set retryOnStatusCodes, retryOnStatusCodesByMethod and retryableTransportFailureMethods are kept as is; unset ones default to a read/write-aware set (GET/HEAD retry any 5xx and 429, other methods retry only 429, 503 and, unless reattach handles them, 502/504). Transport failures are retried for GET/HEAD only. POST transport failures, including TLS handshake and connection-refused errors, fail immediately to avoid replaying a write whose outcome may be unknown.
io.kestra.core.http.client.configurations.HttpConfiguration
falseIf true, allow a failed response code (response code >= 400)
List of response code allowed for this request
The authentication to use.
io.kestra.core.http.client.configurations.BasicAuthConfiguration
The password for HTTP basic authentication.
The username for HTTP basic authentication.
io.kestra.core.http.client.configurations.BearerAuthConfiguration
The token for bearer token authentication.
io.kestra.core.http.client.configurations.DigestAuthConfiguration
The password for HTTP Digest authentication.
The username for HTTP Digest authentication.
UTF-8The default charset for the request.
java.nio.charset.Charset
trueWhether to enable TCP Keep-Alive extended socket options (TCP_KEEPIDLE, TCP_KEEPINTERVAL, TCP_KEEPCOUNT).
Set to false when running on Windows workers, as these extended socket options are not supported by the Windows JDK and will cause connection failures.
trueWhether redirects should be followed automatically.
REQUEST_HEADERSREQUEST_BODYRESPONSE_HEADERSRESPONSE_BODYThe enabled log.
The proxy configuration.
io.kestra.core.http.client.configurations.ProxyConfiguration
The address of the proxy server.
The password for proxy authentication.
The port of the proxy server.
DIRECTDIRECTHTTPSOCKSThe type of proxy to use.
The username for proxy authentication.
Retry strategy for HTTP requests.
retry is disabled by default.
Constant retry
Retry with a fixed delay between attempts.
durationRETRY_FAILED_TASKRETRY_FAILED_TASKCREATE_NEW_EXECUTION>= 1durationfalseExponential retry
Retry with exponentially increasing delays between attempts.
durationdurationRETRY_FAILED_TASKRETRY_FAILED_TASKCREATE_NEW_EXECUTION>= 1durationfalseRandom retry
Retry with a random delay within a configurable range between attempts.
durationdurationRETRY_FAILED_TASKRETRY_FAILED_TASKCREATE_NEW_EXECUTION>= 1durationfalse[502,503,504]HTTP status codes that should be retried.
Used for idempotent methods (GET, HEAD) without their own entry in retryOnStatusCodesByMethod. Non-idempotent methods are never retried on a status code unless listed in retryOnStatusCodesByMethod. Defaults to 502, 503 and 504 for idempotent methods (GET, HEAD) only.
Per-HTTP-method overrides for which status codes should be retried.
Keys are HTTP methods (e.g. GET, POST). A method with no entry here falls back to retryOnStatusCodes. This lets a caller retry more broadly for safe, read-only methods (for example, every 5xx and a 429 for GET/HEAD) while keeping a narrower list for methods that write, where retrying a request that may have already been processed by the origin risks duplicating the effect. Example: {GET: [429, 500, 502, 503, 504], HEAD: [429, 500, 502, 503, 504]}.
["GET","HEAD"]HTTP methods for which any transport-level failure may be retried.
A transport-level failure is a connection or timeout error rather than an HTTP response (e.g. a read timeout or a connection reset mid-request). For a method listed here, any such failure is retried. Defaults to GET and HEAD HTTP methods.
The SSL request options
io.kestra.core.http.client.configurations.SslOptions
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 timeout configuration.
io.kestra.core.http.client.configurations.TimeoutConfiguration
The time allowed to establish a connection to the server before failing.
PT5MThe time allowed for a read connection to remain idle before closing it.
parseRunResults booleanstring
trueParse run results
If true (default), parses dbt run results to expose node durations and warnings.
pollFrequency string
PT5SPoll frequency
Interval between status checks when waiting. Default 5s.
reattach booleanstring
falseReattach to an in-flight run
If true, the task reattaches to a run it already started (matched by the taskrun id in the run cause) instead of triggering a duplicate. On a worker restart or retry it adopts an in-flight or already-succeeded run, so a delayed retry after a lost response does not duplicate, but lets a failed or cancelled run re-trigger. If the trigger call itself fails with an ambiguous error (a read timeout, a mid-flight drop, or a 502/504 gateway error) that may mean dbt Cloud already received it, it confirms and adopts the run this attempt created (never a stale run left over from a prior attempt) and reports its real outcome. Two small residual gaps remain. A 503 on the trigger POST is still retried internally, since a 503 almost always means the request never reached dbt Cloud, so in a rare case it could double-trigger. And the restart or retry check scans only the most recent runs of the job, so on a very busy or heavily shared job that has accumulated a large backlog of runs since this one started, it may not find the earlier run and could trigger a duplicate. Default false, which always triggers a new run.
schemaOverride string
Schema override
Destination schema to use instead of the job target default.
stepsOverride array
Steps override
Custom steps list executed instead of the job defaults.
targetNameOverride string
Target name override
Value for the target.name context variable.
threadsOverride string
Threads override
Thread count for the run.
timeoutSecondsOverride integerstring
Timeout override
Job timeout in seconds for this run.
wait booleanstring
trueWait for completion
If true (default), polls dbt Cloud until the run ends and streams logs and artifacts.
Outputs
manifest string
uriManifest URI
Internal storage URI for manifest.json, when available.
runId integer
Run ID
dbt Cloud run identifier returned by the trigger call.
runResults string
uriRun results URI
Internal storage URI for run_results.json, when available.