Git Sync for dbt (beta)

Sync your Models via Git

Git Sync for dbt allows you to version-control your workflow settings via git. When enabled, your Sync will read/write from a schema file and commit any changes. This ensures that your model definition is always the source of truth for your workflows.

This requires two steps:

  • Connecting your git account to Hightouch

  • Defining your workflow in the model metadata

Connecting to your git repository

Navigate to your Git Sync Settings and save your git credentials (for service providers like GitHub or Bitbucket see our article on Authenticating for Git Sync).

Enabling Bidirectional will enable bidirectional syncing; whenever a change is made to your sync in Hightouch a commit or pull request will be created in your repository reflecting the change.

Defining your workflow

In your repository create a hightouch.yml file like so:

syncs:
- model_id: 123
  destination_id: 52407
  schedule:
    type: cron
    expression: "*/30 * * * *"
  config:
    subscribeAdd: true
    subscribeChange: false
    subscribeDelete: false
    mappings:
    - from: id
      to: id
    - from: email
      to: email
    - from: first_name
      to: firstName
    - from: last_name
      to: lastName

You must define a model_id, destination_id, schedule and config property for each sync.

Model ID

The model id property represents the Hightouch model that your sync will use. To find the identifier navigate to your model in Hightouch and grab the identifier from the pathname (ex: https://app.hightouch.io/models/123).

Destination ID

The destination id property represents the Hightouch desitnation that your sync will use. To find the identifier navigate to your destination in Hightouch and grab the identifier from the pathname (ex: https://app.hightouch.io/destinations/52407).

Schedule

The schedule property defines which schedule the query will be created with. The following are possible options:

Schedule: Manual

schedule:
  type: manual

Schedule: Interval

schedule:
  type: interval
  unit: minute|hour|day|week
  quantity: 1

Schedule: Cron

schedule:
  type: cron
  expression: "*/30 * * * *"

Schedule: dbt

dbt is only available if you are using the dbt Cloud integration

schedule:
  type: dbt
  accout_id: 1
  job_id: 1

Config

The destinations property is an array of possible destinations to connect your query results to.

The config property is different for each type of destination. To learn each variation of the config property read our dbt Destination Config document.

Last updated

Was this helpful?