Sections in this category

dbt Cloud - Metric Import Beta Guide

  • Updated

 

Note: This feature is in Beta and not officially supported for use by Sisu. If you are participating in the Sisu Beta, we appreciate feedback to improve this feature for general availability release in the future

 

This is a guide for Sisu’s dbt Cloud Metric Integration via the Metadata API. Define metrics in dbt Models and import them directly into Sisu to get started with analysis immediately. 

Requirements

  • Dbt Cloud account on the Team plan to be able to use the Metadata API.
  • Use dbt Core v1.0 or later.
  • Sisu connected to a cloud data warehouse that the dbt Cloud also uses. 
  • Preferable: Connect to Snowflakewarehouse to take advantage of full functionality. 
  • Preferable: Use a multi-tenant instance of dbt Cloud.

Instructions

  1. Define metrics in the dbt model .yml file (see doc).
    db20.png

  2. Generate and copy an API key (service token) for the project of interest from dbt Cloud account settings.
    dbt8.png
  3. Copy the dbt Cloud production job ID for the model of interest. It must use the same data warehouse as Sisu. Find it in the URL: “https://cloud.getdbt.com/#/accounts/[your_account_id]/projects/[your_project_id]/jobs/[your_job_id]/

  4. Open the Sisu Data Library and then data sources.
    mceclip2.png
  5. Add a new data source. Link the dbt Cloud to the existing source – a cloud data warehouse containing the dbt models and tables to use. An API key and job ID are needed to connect to dbt Cloud. The source can be edited if the key or job ID change.
    dbt6.png
  6. Go to a project or the metric library and create a new metric. Select the dbt Cloud source. The metric list will render below. Select a metric to analyzemceclip0.png
    mceclip3.png
    mceclip4.png
  7. Once the metric is loaded, preview the dataset and adjust the analysis dimension selection as needed. The run ID and import time are indicated. Core properties of the imported metric cannot be edited. 
    mceclip5.png
    mceclip6.png
  8. Finally save the metric and run analyses. The metric can be duplicated and iterated on via ‘Edit metric definition’. 
    mceclip7.png

Beta Requests

  • Please provide feedback about how the metric integration performs, including speed and functionality. 
  • If you have any ideas for future improvements, we’d like to take them into consideration. 
    • Sisu’s long-term vision is to support dynamic dbt metric syncing and surface additional metadata in a metrics library.

 

Notes

  • The metric import is one time only. Sisu has future plans to support metric syncing to update definitions and data models. 
  • Dbt doesn’t yet support categorical or weighted metrics. 
  • Sisu doesn’t support min or max metrics. 

mceclip0.png