/ Docs

dbt

Last updated October 13, 2025 · View as Markdown

dbt-logo.svg dbt (data build tool) enables analytics engineers to transform data in their warehouses by writing select statements. It helps data analysts transform data using simple select statements, effectively creating your entire transformation process with code.

In order to integrate dbt with Relyance AI you will need an API Key and Subdomain.

In dbt:

  1. Create a Personal Access Token as per the DBT Labs guide here. Use this token as your API Key in Relyance.
  2. Copy the Subdomain from your browser URL. Example: If you see https://acme.us1.dbt.com copy the portion between https:// and dbt.com.

dbtlabs-5.png

In the Relyance AI application:

  1. Login to your Relyance account.
  2. Navigate to the Settings Menu in the bottom left-hand side.
  3. Select Integrations.
  4. Click on the vendor Integration tab.
  5. Find the dbt integration card and click it to open its connections.
  6. Under Authentication Method, choose Custom.
  7. Paste the API Key into its respective fields.

dbtlabs-4.png

  1. Additional Features:
    • Use the Vendor Discovery checkbox if you wish to run this integration with Vendor Discovery Enabled.
    • Select the Enable Data Inspection checkbox if you wish Relyance also to inspect the data. For more information on Relyance features, please refer to this help center article: here.

The Authentication step asks for:

  1. Click Authenticate.
  2. At this point, you should see the following result on the vendor Integrations page:

dbtlabs-3.png

  1. Congratulations, you are now connected to dbt.

If the connection reports Connected but returns nothing

These are the ways this integration comes back empty without reporting an error. Generated from the integration catalog, so it tracks what the connection actually asks for.

  1. A credential rotated at the vendor is not picked up here. API Key is stored when you save the connection, so regenerating the value at the vendor breaks the next scan until it is re-pasted here. Recording the expiry on the connection means Relyance warns you before it lapses.
  2. Check the address fields before suspecting the credentials. Subdomain (Eg: abc123.us1) identifies which tenant, region or host to talk to. A wrong value there fails authentication and looks exactly like a bad secret.

Manage this integration with Terraform

Connections for this integration can be managed as code with the Relyance Terraform provider. Non-secret fields go in auth.params; secret fields go in auth.secrets_wo, which is write-only — never stored in Terraform state. Rotate secrets by bumping auth.secrets_wo_version.

resource "relyance_integration_connection" "dbtlabs" {
  vendor = "dbtlabs"
  name   = "<your connection name>"

  auth = {
    method = "api-key"
    params = {
      data_storage_location = "us"
    }
    # Secret fields are write-only: sent to Relyance, never stored in state.
    secrets_wo = {
      api_key = var.dbtlabs_api_key
    }
    secrets_wo_version = 1
  }

  scans = { "data-inspection" = { enabled = true } }
}