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

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"
}

Last updated