dbt integration
  • 04 Sep 2023
  • 1 Minute to read
  • Dark
    Light

dbt integration

  • Dark
    Light

Article Summary

Plan eligibility.

Preset's dbt integration feature is only available for the Enterprise plan.

Overview

Preset integrates with transformation layers like dbt and Cube, allowing your team to define and manage business logic and metrics in source control to use them across multiple applications.

You can use Preset with open-source dbt Core or its hosted solution, dbt Cloud.

To synchronize your models and metrics from dbt Core, you will need to run a simple command using Preset's command line interface (CLI). Follow our blog post for additional instructions.

This article will cover how you can synchronize your dbt Cloud projects through Preset's user interface.

Connecting your dbt Cloud projects

  1. Go to the "Database" list view by clicking on the Settings tab in the top right navigation, then select Database Connections.
    Screenshot 2023-05-22 at 6.17.38 PM.png

  2. Click on the Edit (pencil) icon of the database synchronized with your dbt project.
    Screenshot 2023-05-22 at 6.20.46 PM.png

  3. Go to the Advanced tab of the "Edit Database" modal.
    image.png

  4. Enter your dbt Cloud service auth key that has Account Admin permission (required to fetch the projects and jobs available) and the Metadata Only permission (required to fetch the model and metric definitions). Then select your "Account", "Project", "Jobs", and "Models".
    Edit database 1.png

Choosing your dbt models

You can either select an option from the dropdown list in the modal or use dbt Graph Operators if you have multiple models to sync.

  1. After setting up the connection, syncing will start. The selected dbt models will be synced as Preset Datasets.

Synchronization

Your dbt models and metrics will be synced as Preset datasets. Synchronization will happen automatically when you first set up your connection and on a daily basis.

Only metrics that read from a single dbt model will be synchronized.

Metrics built from multiple models will not be synchronized.

Deleting your dbt Cloud projects

Update your dbt Cloud connection before deleting datasets.

If you want to delete any of the datasets synced with your dbt projects, you need to update your dbt Cloud connection first. If you delete the datasets without editing the dbt Cloud settings, the dataset will be recreated when dbt syncs again.

You can edit your dbt Cloud settings in the "Edit Database" modal.
Edit database 2.png


Was this article helpful?