This connector extracts metadata from a dbt cloud project using the Administrative API.
We recommend creating a dedicated service account token for the connector with minimally required permissions. This means Read-only
permissions for Team plan and Account Viewer
permissions for Enterprise plan.
Create a YAML config file based the following template.
account_id: <dbt_cloud_account_id>
service_token: <service_account_token>
You can extract account_id
, project_id
and environment_id
from a dbt environment URLs, which have the format https://cloud.getdbt.com/deploy/<account_id>/projects/<project_id>/environments/<environment_id>/
.
See Output Config for more information.
If you're using dbt Single Tenancy, you'll also need to specify a different base URL:
base_url: https://cloud.<tenant>.getdbt.com
Specify this if your dbt instance isn't a North America multi-tenant deployment. See Discovery API endpoints for reference.
discovery_api_url: https://metadata.cloud.getdbt.com/graphql
project_ids:
- <project_id_1>
- <project_id_2>
If project_ids
are specified, only assets from those projects are collected. If it is not provided, all dbt assets will be collected.
environment_ids:
- <environment_id_1>
- <environment_id_2>
If environment_ids
are specified, only assets from those environments are collected. If it is not provided, all dbt assets will be collected.
Follow the Installation instructions to install metaphor-connectors
in your environment (or virtualenv). Make sure to include either all
or dbt
extra.
Run the following command to test the connector locally:
metaphor dbt.cloud <config_file>
Manually verify the output after the run finishes.