Search documentation...

K

Create models using dbt models and analyses

Hightouch can communicate with two distinct Git repository types. The dbt extension interacts with Git repositories that contain dbt projects. These are separate from the Git repository used for Git Sync to version control your Hightouch settings.

If you've invested in building models with dbt, you likely want to use those models as the source of truth for your downstream data needs. At Hightouch, we use dbt to build most of our models for analytics and reporting.

Our dbt integration lets you define Hightouch models using your dbt models and analyses.

dbt-based models in Hightouch

Connect to your Git repository

Navigate to the dbt extension configuration page and enter your Git credentials under Credentials.

If you're using GitHub, it's best to use Hightouch's GitHub App for the most up-to-date feature support.

To set it up, choose GitHub App as the Git Service, and then select Configure GitHub App.

Hightouch GitHub app

This prompts you to install the Hightouch Connect app in the relevant GitHub repository.

For other Git services, you can choose to use either SSH or HTTP protocol. SSH protocol requires you provide an SSH private key and HTTP requires a username and token.

Hightouch GitHub app

See GitHub documentation or GitLab documentation for instructions on creating personal access tokens.

Configure dbt model selector

When connecting dbt sources for the first time or making changes to your dbt model sync configuration, you usually only need to click Save and not Full Resync for Hightouch to create or update your configuration.


The Full Resync action is only necessary when making significant changes in your dbt Git repository. It restarts dbt compilation from a fresh state and can take a significant amount of time. After clicking this button, wait for the updated dbt models to compile before making any changes to your configuration.

You can use dbt models and analyses from your Git repository for any source in Hightouch.

The default schema is the schema where dbt materializes your tables to unless otherwise specified in project file. Some common examples are public, production, dbt_production.

Hightouch lets you optionally specify dbt selectors like tag:hightouch. Otherwise, we use * and sync all dbt models to Hightouch.

You can also specify which version of dbt you want to use. By default, Hightouch uses the most recent version available in the drop-down menu.

Hightouch's dbt integration automatically looks for your dbt_project.yml file in the repository directory. If your project file is named something else, for example, dbt_project.yaml, or you have multiple dbt_project.yml files, you can specify a relative path to your project file, for example, ./hightouch/dbt/dbt_project.yaml.

After saving your settings, it may take a one to two minutes for Hightouch to sync your dbt models and for the sync status to turn green.

Select a model

Once you've configured the dbt model selector, you can use dbt models and analyses in the Hightouch model creation process. Select the dbt model tab in the query explorer to view all your available dbt models and analyses.

dbt model selection

The compiled SQL shown in the preview is only for preview purposes. When Hightouch queries the warehouse, we query the table built by dbt.

dbt observability layer

Hightouch lets you validate dbt model changes as they relate to Hightouch syncs and observe how Hightouch syncs are using your dbt models. Check out our dbt observability layer documentation for more information.

Supported dbt versions

Hightouch supports all dbt versions >= 0.19. You can set the version in the dbt setup page. If you need support for a version not listed, .

If you update your dbt version, return to Hightouch to update your dbt version selection. Once you've made the update, it may take up to 15 minutes for the changes to take effect.

Unsupported features

Hightouch doesn't support the following features:

  • Private dependency packages
  • Pre- and post-hooks (limited support, this may work depending on the hook)

Hightouch compiles the project using dbt compile to resolve your data warehouse's schema and generate compiled SQL for preview purposes. When running the model in Hightouch, we query the materialized table directly.

Tips and troubleshooting

Credential errors

If your Git credentials are out of date, you won't be able to connect your dbt models and analyses. We recommend using Hightouch's GitHub app for your credentials if you're using GitHub.

Ready to get started?

Jump right in or a book a demo. Your first destination is always free.

Book a demoSign upBook a demo

Need help?

Our team is relentlessly focused on your success. Don't hesitate to reach out!

Feature requests?

We'd love to hear your suggestions for integrations and other features.

Last updated: Mar 10, 2023

On this page

Connect to your Git repositoryConfigure dbt model selectorSelect a modeldbt observability layerSupported dbt versionsUnsupported featuresTips and troubleshootingCredential errors

Was this page helpful?