Overview
The 4MINDS platform integrates with dbt (dbt Cloud), letting you import your project’s metadata — model definitions, sources, tests, exposures, and account structure — directly into your 4MINDS models. This makes your dbt project’s semantic layer available for AI-powered querying, knowledge graph construction, and retrieval. 4MINDS supports two ways to connect:Both methods are read-only against your dbt account. OAuth cannot list jobs or import a run manifest — those operations require a service token.
Getting Started
Prerequisites
- A dbt Cloud account
- Your account’s Access URL and numeric Account ID (see Finding your Access URL and Account ID)
- A 4MINDS account with access to the Integrations page
- For OAuth: your dbt account must allow OAuth app registration (App integrations). No manual setup is required — 4MINDS registers itself automatically (see below). App integrations may require an Enterprise-tier dbt plan.
- For Service Token: permission to create a service token in dbt
Finding your Access URL and Account ID
Both connection methods need these two values:- Access URL — your dbt account’s base URL. For multi-tenant accounts this is
https://cloud.getdbt.com. Cell-based or single-tenant accounts use a URL likehttps://abc123.us1.dbt.com. You can find it in dbt under Account Settings. - Account ID — the numeric account identifier. It appears in your dbt URL (for example,
https://cloud.getdbt.com/settings/accounts/12345→ the Account ID is12345) and in Account Settings.
Option 1 — Connect with OAuth
OAuth is the recommended method for read-only metadata access. 4MINDS never stores a long-lived secret, and access tokens are refreshed automatically. No manual setup in dbt is required. 4MINDS registers itself automatically using your account’s OAuth app registration (RFC 7591 Dynamic Client Registration), so there’s no integration to add or Redirect URI to configure by hand. When you connect, a read-only client named 4MINDS is created on your dbt account — you’ll see it under Account Settings → Integrations in the Dynamically registered list.Connect from 4MINDS
- Sign in to 4MINDS.
- Navigate to the Integrations page from the main navigation bar.
- Locate the dbt integration card and click on it.
- Choose the OAuth tab.
- Enter your Access URL and Account ID.
- Click Connect with dbt. A popup opens dbt’s authorization screen.
- Sign in to dbt (or use an existing session) and approve the requested read-only access.
- Once authorized, the popup closes and the connection is established.
If the popup is blocked, enable popups for the 4MINDS site in your browser and try again.
If your dbt account has OAuth app registration disabled, the connect attempt will report that app integrations aren’t enabled. Ask a dbt admin to enable App integrations under Account Settings → Integrations, or connect with a service token instead.
OAuth scopes
When you connect via OAuth, 4MINDS requests only read-only scopes:Option 2 — Connect with a Service Token
Use a service token if you need full read access, including listing jobs and importing a run’s manifest.Step 1 — Create a service token in dbt
- In dbt, go to Account Settings → Service tokens (on some accounts this is under API Access).
- Click Create service token (or New token).
-
Give it a name — for example,
4MINDS. -
Assign permission sets. 4MINDS reads from two different dbt APIs, so a token needs coverage for both:
Assign both sets to the same token. Metadata Only alone does not grant Administrative API access, and an admin/job set alone does not grant Discovery access. 4MINDS only ever reads — no write permission is required.
- Save the token and copy it immediately — dbt shows the token value only once.
The exact permission-set names and their availability depend on your dbt plan. If your plan doesn’t expose these granular sets, a broader read-capable set (e.g. Account Admin) also works, but least-privilege (Metadata Only + a read-only job/account set) is recommended.
Store the token securely. Anyone with the token can read from your dbt account within the granted permission set.
Step 2 — Connect from 4MINDS
- Sign in to 4MINDS and open the Integrations page.
- Click the dbt integration card.
- Choose the Service Token tab.
- Enter your Access URL, Account ID, and the Service Token you created.
- Click Test Connection to verify the credentials, then Save Credentials.
Disconnecting
To disconnect dbt, open Integrations from the main navigation bar, find dbt, and click Disconnect. This removes your stored credentials (and, for OAuth, your tokens) from 4MINDS.Available Data Types
The following dbt data types can be imported into 4MINDS:Listing jobs and importing a run manifest are not available over OAuth (read-only scopes). Connect with a service token to use them.
Importing Data
Creating a Model with dbt Data
- Navigate to the Models page and click Create Model.
- Provide a name and use case for the model (e.g., “dbt Catalog” / “Analyze our dbt project metadata”). Press Next.
- On the Upload Data step, select the Integrations option.
- Scroll to the Enterprise group and choose dbt.
- Select the data types you’d like to import (models, sources, tests, exposures, metadata).
- Confirm the import and create the model.
Querying Your Data
- Find the model you created on the Models page.
- Click the Run button.
- On the chat interface, send a prompt or query to get AI-generated responses about your dbt project.
Troubleshooting
Security & Privacy
- Read-only: Both connection methods only read from your dbt account.
- OAuth 2.0 with PKCE: OAuth connections use industry-standard OAuth 2.0 with PKCE. 4MINDS stores no long-lived secret for OAuth.
- Encrypted at rest: Service tokens and OAuth tokens are encrypted at rest.
- Automatic token refresh: OAuth tokens are refreshed automatically before they expire.
- Per-user access: Each user connects their own dbt account; connections are not shared across users.