ht
Documentation
WelcomeConcepts

Get Started

OverviewCreate a sourceCreate a modelCreate a destinationCreate a sync

Integrations

AWSdbt Clouddbt ModelsGit SyncAirflowHTTP APIPagerDuty
Documentation/Integrations/Git sync
ht
Documentation

Git Sync

Table of Contents
Syncing your Hightouch configuration to Git

Syncing your Hightouch configuration to Git

Git 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:
  1. Create a Git Repository, if you don't already have one to store your schema files
  2. Authenticate to Git
  3. Enable Git Sync for your workspace

Authenticate to Git

If you don't already have a git repository created, the first step is to create one. If you create an empty repository, make sure you follow the instructions to also create your first example commit, e.g. a README file, so that a branch exists.Once you have a repository, fill in your Git Credentials on the integrations tab in settings.For Github, Github OAuth is the easiest way to get started. You'll also need to configure permissions to the repository, selecting the particular repo Hightouch should have access to.

Enable Git Sync

Next, you'll need to enable Git Sync for your workspace. Head to the Git Sync tab on the settings page, pick the repo and branch where you'd like changes saved to and read from.Optionally, select a Path where the sync and models folders should be created, for example, here we're saving our settings to the hightouch subfolder.Hightouch will create folders for syncs and models within 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!

Schemas

There are two schema files: models and syncs.Models have a consistent schema.
name: > the model name/slug. unique per model
source: > the name/slug of the source. the slug is visible on the source page
type: > one of: raw_sql, table, or dbt_model
dbtModel: > 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 albums
tableName: > null or the table name to use
isSchema: > used internally by Hightouch, this should always be false
primaryKey: > primary key column for this model, e.g. album_id
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.
model: > model name/slug for this sync.
destination: > destination name/slug for this sync
config:
> destination dependent config for this sync.
schedule: > type of schedule to use. the format here varies based on the
schedule selected, we recommend using the UI as a starting point.
schedulePaused: > boolean, where this sync is paused, or enabled.

Next steps

From here, you have the full power of Git in your hands. Here's some potential ideas to try next:
  • 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