Prepare to run the dbt Cloud collector
Configure dbt Cloud and create authentication tokens before running the collector.
Before you begin
Role required: none
About this task
Complete these preparation tasks before running the dbt Cloud collector.
Procedure
Obtain the required IDs from dbt Cloud.
Create an API token based on your dbt Cloud plan.
- Enterprise plan: See Create a service token
- Team plan: See Create a user token
- Enable documentation generation in job settings.
Parent Topic:dbt Cloud metadata collector
Obtain account, project, job, and run IDs
Obtain required IDs from dbt Cloud URLs for collector configuration.
Before you begin
Role required: none
About this task
You’ll use this information when configuring the collector for metadata harvesting.
Procedure
Obtain the Account ID and Project ID.
Navigate to Deploy > Jobs.
Copy the Account ID and Project ID from the URL.
URL format:
https://cloud.getdbt.com/deploy/<accountID>/projects/<projectID>/jobs
Obtain the Environment ID and Environment Name.
Navigate to Deploy > Environments.
Select the environment that you want to run the collector against.
Copy the Environment ID from the URL or note the Environment Name from the page title.
URL format:
https://cloud.getdbt.com/deploy/<accountID>/projects/<projectID>/environments/<environmentID>
Obtain the Job ID.
From the Jobs section, select the job associated with your environment.
Copy the Job ID from the URL or note the Job name from the page title.
URL format:
https://cloud.getdbt.com/deploy/<accountID>/projects/<projectID>/jobs/<jobID>
: Obtain a specific Job Run ID.
By default, the collector harvests from the most recent successful job run. To harvest from a specific run, complete these steps.
From the Job page, select a specific job run.
Copy the Job Run ID from the URL.
URL format:
https://cloud.getdbt.com/deploy/<accountID>/projects/<projectID>/runs/<jobRunID>
Create a user token
Create a personal access token for metadata harvesting.
Before you begin
Role required: admin
Plan required: Team.
About this task
The Team plan doesn’t support service account tokens. You must create a personal access token using a dedicated user account.
Procedure
Create a dedicated user account for the collector.
Assign the Admin role to the user account.
Log in as the dedicated user.
Navigate to Profile > Access Tokens.
Generate a Personal Access Token.
Copy the token value.
You’ll use this token value for the dbt Cloud API key when configuring the collector.
What to do next
See the dbt Cloud user tokens documentation for additional information.
Create a service token
Create a service account token with the required permissions for metadata harvesting.
Before you begin
Role required: admin
Plan required: Enterprise.
About this task
For Enterprise accounts, service account tokens are commonly used for production systems.
Procedure
Create a service account token.
Follow the steps in the dbt Cloud service tokens documentation.
Assign roles to the service account token.
- Account Viewer: Assigned at the account level
- Job Viewer: Assigned at the project level for each project to collect metadata from
- Copy the token value.
You’ll use this token value for the dbt Cloud API key when configuring the collector.
Update job execution settings
Enable documentation generation in dbt Cloud job settings. This setting must be enabled to successfully harvest dbt resources.
Before you begin
Role required: admin
This setting must be enabled to successfully harvest dbt resources.
Procedure
Navigate to Deploy > Jobs.
From the Environment list, select the environment you want to run the collector against.
Select the job associated with your environment.
Select Settings.
Under Execution Settings, select Generate docs on run.