Skip to main content

dbt

Jump-start your experience with Qluent and continue managing Qluent via your dbt project.
By importing your dbt project into Qluent, you avoid duplicating work and continue to reap the benefits of dbt. You can manage context and data enabled in Qluent directly from your dbt source files.

Illustrates importing a dbt project into Qluent, enabling data and setting descriptions.

To connect your dbt project, you'll need the following:

  1. The region where your subscription is hosted
  2. The Discovery API URL (See guidance)
  3. A service token with "Metadata Only" permissions
  4. The environment ID — we recommend using a production environment unless Qluent is intended for non-production testing

For testing, you may use a personal token. However, we recommend service tokens for live projects.

Getting Your dbt Credentials

  1. Log in to your dbt Cloud dashboard
  2. In the side panel, choose the account to connect and go to Account settings
  3. The region is listed under Account information
  4. Under Access URLs, copy the Discovery API URL, you will need to include /graphql to the end i.e. https://qh274.metadata.us1.dbt.com/graphql
  5. In the side panel, navigate to API tokens > Service tokens (requires Account Admin access)
  6. Create a new token named "Qluent" or a name of your choice
  7. Click Add permission and choose Metadata Only
  8. Save and copy the access token (starts with dbtc_ or dbtu_)
  9. Go to Deploy > Environments
  10. Choose the desired environment (e.g., Production)
  11. Copy the environment ID from the URL, e.g., 70471823443111 from:
    https://qh274.us1.dbt.com/deploy/70471823457711/projects/70471823465011/environments/70471823443111
  12. If you haven't yet created a Qluent project, enter these details at app.qluent.com and click Next

Create a Webhook

To automatically update Qluent from dbt, create a webhook:

  1. Log in to your dbt Cloud dashboard
  2. In the side panel, go to Account settings
  3. Click Webhooks
  4. Click Create webhook
  5. Set a name and description (e.g., "Qluent" / "Automatically syncs metadata to Qluent project")
  6. Select Run completed under Events
  7. Leave Jobs as-is
  8. Paste the webhook URL provided by Qluent into the Endpoint field
  9. Click Save
  10. Copy the generated secret key back into Qluent at app.qluent.com and continue

The sync process

When you run dbt build on your project Qluent receives a notification when the run completes and applies the changes if it was successful.

Enabling models

If you want certain models to automatically become enabled within Qluent you can do so by annotating the model yaml with a "qluent" tags

# ~/models/marts/fct_orders.yml

version: 2

models:
- name: fct_orders
description: Shopify orders from 2020 to 2025 containing x, y and z
config:
tags:
- "qluent"
columns:
- name: order_id
description: The Shopify order id
...

You can simplify this further by applying tags to entire model directories. See https://docs.getdbt.com/reference/resource-configs/tags