Dbt Cloud TriggerRun

Dbt Cloud TriggerRun

Certified

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.

yaml
type: io.kestra.plugin.dbt.cloud.TriggerRun
yaml
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.

yaml
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

Numeric ID of the account

The numeric dbt Cloud account ID, visible in the account settings and in the dbt Cloud URL.

Job ID

Numeric dbt Cloud job identifier to trigger.

API token

A dbt Cloud API token (a Service Account token or a Personal Access token); sent as a Bearer token.

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.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset 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.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
Defaulthttps://cloud.getdbt.com

Base 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.

DefaultTriggered by Kestra.

Run cause

Reason passed to dbt Cloud. Defaults to "Triggered by Kestra."

dbt version override

dbt version string to force for this run.

Generate docs override

Whether the run builds docs even if the job is configured otherwise.

Git branch override

Branch to checkout when triggering the job.

Git SHA override

Specific commit to checkout before the run.

DefaultPT1H

Max wait duration

Ceiling for waiting on job completion. Default 60m.

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.

Definitions
allowFailedbooleanstring
Defaultfalse

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

allowedResponseCodesarray
SubTypeinteger

List of response code allowed for this request

auth

The authentication to use.

type*object
passwordstring

The password for HTTP basic authentication.

usernamestring

The username for HTTP basic authentication.

type*object
tokenstring

The token for bearer token authentication.

type*object
passwordstring

The password for HTTP Digest authentication.

usernamestring

The username for HTTP Digest authentication.

defaultCharsetstring
DefaultUTF-8

The default charset for the request.

enabledTcpExtendedKeepAlivebooleanstring
Defaulttrue

Whether 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.

followRedirectsbooleanstring
Defaulttrue

Whether redirects should be followed automatically.

logsarray
SubTypestring
Possible Values
REQUEST_HEADERSREQUEST_BODYRESPONSE_HEADERSRESPONSE_BODY

The enabled log.

proxy

The proxy configuration.

addressstring

The address of the proxy server.

passwordstring

The password for proxy authentication.

portintegerstring

The port of the proxy server.

typestring
DefaultDIRECT
Possible Values
DIRECTHTTPSOCKS

The type of proxy to use.

usernamestring

The username for proxy authentication.

retry

Retry strategy for HTTP requests.

retry is disabled by default.

Retry with a fixed delay between attempts.

interval*string
Formatduration
type*object
behaviorstring
DefaultRETRY_FAILED_TASK
Possible Values
RETRY_FAILED_TASKCREATE_NEW_EXECUTION
maxAttemptsinteger
Minimum>= 1
maxDurationstring
Formatduration
warningOnRetryboolean
Defaultfalse

Retry with exponentially increasing delays between attempts.

interval*string
Formatduration
maxInterval*string
Formatduration
type*object
behaviorstring
DefaultRETRY_FAILED_TASK
Possible Values
RETRY_FAILED_TASKCREATE_NEW_EXECUTION
delayFactornumber
maxAttemptsinteger
Minimum>= 1
maxDurationstring
Formatduration
warningOnRetryboolean
Defaultfalse

Retry with a random delay within a configurable range between attempts.

maxInterval*string
Formatduration
minInterval*string
Formatduration
type*object
behaviorstring
DefaultRETRY_FAILED_TASK
Possible Values
RETRY_FAILED_TASKCREATE_NEW_EXECUTION
maxAttemptsinteger
Minimum>= 1
maxDurationstring
Formatduration
warningOnRetryboolean
Defaultfalse
retryOnStatusCodesarray
SubTypeinteger
Default[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.

retryOnStatusCodesByMethodobject
SubTypearray

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]}.

retryableTransportFailureMethodsarray
SubTypestring
Default["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.

ssl

The SSL request options

insecureTrustAllCertificatesbooleanstring

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.

timeout

The timeout configuration.

connectTimeoutstring

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

readIdleTimeoutstring
DefaultPT5M

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

Defaulttrue

Parse run results

If true (default), parses dbt run results to expose node durations and warnings.

DefaultPT5S

Poll frequency

Interval between status checks when waiting. Default 5s.

Defaultfalse

Reattach 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.

Schema override

Destination schema to use instead of the job target default.

SubTypestring

Steps override

Custom steps list executed instead of the job defaults.

Target name override

Value for the target.name context variable.

Threads override

Thread count for the run.

Timeout override

Job timeout in seconds for this run.

Defaulttrue

Wait for completion

If true (default), polls dbt Cloud until the run ends and streams logs and artifacts.

Formaturi

Manifest URI

Internal storage URI for manifest.json, when available.

Run ID

dbt Cloud run identifier returned by the trigger call.

Formaturi

Run results URI

Internal storage URI for run_results.json, when available.