Table of ContentsGit sync allows you to version-control your workflow settings via git. When enabled, Hightouch will read from and write to Hightouch schema files within your Git repository as changes are made.The Hightouch Git Integration brings all the great features of Git to your Reverse ETL Workflows: commit logs of incremental changes, the ability to roll back to a previous state, and the ability to use code to create and edit Hightouch syncs and modelsTo get started, you need a few prequisites:
- Create a Git Repository, if you don't already have one to store your schema files
- Authenticate to Git
- Enable Git Sync for your workspace
modelswithin this subfolder, or in the root of your Git repo if no path is selected.After clicking save, Hightouch will create the subfolder if needed and start writing your models and syncs to your repo.From here, you're all set. Future changes in the UI will be written in the repo, and if you create any new models or syncs in Git, they will be also be created in Hightouch.As a note, deletions from Git are currently not supported. If you delete a file in Git, the corresponding model or sync will still remain in Hightouch. The file won't be rewritten to Git until the next change in Hightouch, unless a full resync is triggered. We are currently working on supporting soft deletes in order to make deletions in Git more safe!There are two schema files: models and syncs.Models have a consistent schema.
The schema for syncs is destination dependent. For this reason, we recommend creating syncs within the UI initially, and then using the written schema to create new syncs or modify existing ones. The name of the yaml is taken as the name of the sync.name: > the model name/slug. unique per modelsource: > the name/slug of the source. the slug is visible on the source pagetype: > one of: raw_sql, table, or dbt_modeldbtModel: > null or the name of the dbt model to select, written as `model.<package_name>.<model_name>`rawSql: > null or the sql to use, e.g. select * from albumstableName: > null or the table name to useisSchema: > used internally by Hightouch, this should always be falseprimaryKey: > primary key column for this model, e.g. album_id
From here, you have the full power of Git in your hands. Here's some potential ideas to try next:model: > model name/slug for this sync.destination: > destination name/slug for this syncconfig:> destination dependent config for this sync.schedule: > type of schedule to use. the format here varies based on theschedule selected, we recommend using the UI as a starting point.schedulePaused: > boolean, where this sync is paused, or enabled.
- Create a new model by copying an existing model and changing the name and query
- Create a new model and sync at the same time