Requires admin privileges for the dbt Cloud account that hosts and runs your production dbt models
To connect Monte Carlo to a dbt Cloud account, follow these steps:
- Install the Monte Carlo CLI
- Obtain a dbt Cloud API token and account ID
- Create a dbt Cloud integration with the Monte Carlo CLI
Please follow this guide to install and configure the CLI.
Please follow the instructions in dbt Cloud's API documentation to create a dbt Cloud API token. This token will be needed when creating the integration with the Monte Carlo CLI.
To obtain your dbt Cloud account ID, sign into dbt Cloud in your browser. Take note of the number directly following the
accounts path component of the URL -- this is your account ID. For example, if the URL is
https://cloud.getdbt.com/#/accounts/1234/projects/6789/dashboard/, the account ID is
- Choose a warehouse to link with your dbt Cloud:
- If you only have a single warehouse integrated with Monte Carlo, proceed to step two.
- Otherwise, you will need to select a warehouse to link with the dbt Cloud integration. Use
montecarlo integrations listto list out all available connections, and take note of the ID of the warehouse that is used as the target for your dbt Cloud production models.
- Add a dbt Cloud integration:
montecarlo integrations add-dbt-cloud \ --dbt-cloud-api-token <dbt Cloud API token> \ --dbt-cloud-account-id <dbt Cloud account ID> \ --connection-id <connection ID of warehouse>
--connection-idargument is required if you have multiple warehouses integrated -- supply the chosen warehouse connection from step (1).
If you prefer a prompt (with hidden input), supply
-1as an argument to
- Monte Carlo will perform a validation step to ensure that the dbt Cloud account can be successfully accessed. If validation passes, you will be prompted to create the dbt Cloud integration. If validation fails, please double-check that you provided the correct API token and account ID.
At this point, the integration has been created. By default, Monte Carlo will poll your dbt Cloud account hourly to import the latest manifests and run results, across all projects and jobs.
Updated 2 months ago