This is a Jitsu.Classic documentation. For the lastest version, please visit docs.jitsu.com. Read about differences here.
dbt Cloud integration
You can configure Jitsu to trigger dbt Cloud job run on certain events:
- Successful run of Source sync task
- Sync of Destination in batch mode
Configuration#
To enable the integration first you need to configure a special kind of destination with type dbtcloud
:
destinations:
my_dbtcloud:
type: dbtcloud
mode: stream
dbtcloud:
account_id: 12345
job_id: 12345
cause: '`${_.event_type} triggered sync. source: ${_.source}`'
token: '12345'
enabled: true
Then you need to add this destination to post_handle_destinations
collection of Sources and Destinations that need to trigger dbt Cloud job:
sources:
amplitude:
type: amplitude
post_handle_destinations:
- my_dbtcloud
config:
...
destinations:
my_snowflake:
type: snowflake
mode: batch
post_handle_destinations:
- my_dbtcloud
snowflake:
...
dbt Cloud Configuration Parameters#
Parameter | Description |
---|---|
account_id (required) | Numeric ID of the dbt Cloud Account that the Job belongs to |
job_id (required) | Numeric ID of the Job to run |
cause (required) | Text or JavaScript function describing what causing job run |
token (required) | dbt Cloud API key |
enabled (required) | Set to true to enable the integration |
Destination Batch Runs frequency
If dbt Cloud jobs are triggered to frequently you can adjust interval of batch runs with log.rotation_min
configuration parameter.
Supported Events#
dbt Cloud destination works with following event types only:
- SOURCE_SUCCESSFUL_RUN
- DESTINATION_BATCH_RUN
all other events are ignored.
Event body example:
{
"event_type": "DESTINATION_BATCH_RUN",
"source": "my_snowflake",
"_timestamp": "2021-08-05T14:33:18.607892Z",
"finished_at": "2021-08-05T14:33:18.607892Z",
"started_at": "2021-08-05T14:30:55.182912Z"
}