The Hightouch git sync for dbt integration is a beta feature. Email hello@hightouch.io to request access or request a demo at https://hightouch.io
It allows you to define Hightouch workflows next to your dbt models in a git repository. 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
In the top menu navigate to your Connection view and select a Connection.
Then in the right side bar select "Configure Git Sync".
Save your git credentials (for GitHub and GitLab users, provide a personal access token with clone privileges as a password).
In your repository add a hightouch
meta field in your model definition like so:
version: 2​models:- name: usersmeta:hightouch:slug: "select-all-users-query"primary_key: idschedule:type: cronexpression: "*/30 * * * *"destinations:- id: 52407config:subscribeAdd: truesubscribeChange: falsesubscribeDelete: falsemappings:- from: idto: id- from: emailto: email- from: first_nameto: firstName- from: last_nameto: lastName
You must define a slug
, primary_key
, schedule
and destinations
property in the meta field.
The slug
property is a string that represents your query. This string is unique and will be used to determine if your query needs to be created or updated. Changing your slug will result in a new query being created.
The primary_key
property is a string that represents which column is the primary key in your table.
The schedule
property defines which schedule the query will be created with. The following are possible options:
schedule:type: manual
Schedule: Interval
schedule:type: intervalunit: minute|hour|day|weekamount: 1
Schedule: Cron
schedule:type: cronexpression: "*/30 * * * *"
Schedule: dbt
dbt is only available if you are using the dbt Cloud integration​
schedule:type: dbtaccout_id: 1job_id: 1
The destinations
property is an array of possible destinations to connect your query results to.
Each destination requires an id
and a config
property.
The id
property is your destination id
This can be found in the URL path name of your destination in Hightouch. For example, go to https://app.hightouch.io/destinations/, click any destination, and copy the <id> from https://app.hightouch.io/destinations/<id>.
The config
property is different for each type of destinations. To learn each variation of the config
property read our dbt Destination Config document.
​