> ## Documentation Index
> Fetch the complete documentation index at: https://docs.validio.io/llms.txt
> Use this file to discover all available pages before exploring further.

# dbt Cloud

> Integrate Validio with dbt Cloud to validate metadata for model runs and test results.

The dbt Cloud integration connects Validio to your dbt Cloud account for automated data transformation monitoring. Validio validates metadata for test results and model runs. To integrate with dbt Cloud,

1. [Add a warehouse credential](#add-a-warehouse-credential) for the warehouse where your dbt output is stored.
2. [Add a dbt Cloud credential](#add-a-dbt-cloud-credential) which will automatically fetch your data from your dbt Cloud account.
3. [Add dbt sources](#add-a-dbt-source) for monitoring model runs and test results.

Validio also supports integrating with dbt Core. For more information, see [dbt Core](https://docs.validio.io/v10.0/docs/integrations/data-transformation/dbt-core.md).

## Prerequisites for integrating with dbt Cloud

Integrating with dbt Cloud requires a dbt Cloud API token and account ID. The token should have read-only access. For more information, see [dbt Cloud’s API documentation](https://docs.getdbt.com/docs/dbt-cloud-apis/service-tokens).

## Add a warehouse credential

Before creating a dbt Cloud credential, you must create a valid credential for the warehouse where your dbt output is stored. You will reference this warehouse credential when you configure the dbt Cloud credential. For specific credential setup instructions, see [Data Warehouse Sources](https://docs.validio.io/v10.0/docs/integrations/data-warehouses.md) and select the relevant warehouse (for example, [BigQuery](https://docs.validio.io/v10.0/docs/integrations/data-warehouses/bigquery.md) or [PostgreSQL](https://docs.validio.io/v10.0/docs/integrations/transactional-databases/postgresql.md)).

## Add a dbt Cloud credential

To add a credential for monitoring dbt sources,

1. Navigate to **Credentials** and click **+ New credential**.
2. Under **Namespace**, select a namespace where the resources will be created.
3. For **Credential Type**, select **dbt Cloud**.
4. Fill in the **Configuration** parameter fields. Refer to the [dbt Cloud Credential Parameters](#dbt-cloud-credential-parameters) table.
5. (Optional) Click **Test credential** to validate that Validio can access the dbt Cloud account. If validation fails, check that you provided the correct parameter values.
6. Click **Create credential**.

After the credential is created, Validio automatically fetches the metadata for your dbt runs and tests on a regular schedule.

> [!NOTE]
>
> Validio fetches and processes results from dbt runs and tests on a regular schedule. Depending on the schedule, it might take up to 60 minutes after the dbt Cloud credential is successfully added before you see dbt metadata.

Once the credential is created, you can add sources to track dbt model runs and test results.

### dbt Cloud credential parameters

| Field | Description |
| :- | :- |
| Name | Identifier for the credential. This name will be referenced when creating a source. |
| Warehouse credential | Credential for the warehouse where your dbt output is stored. |
| Account ID | dbt Cloud account ID. |
| API base URL | (Optional) dbt Cloud base URL. |
| dbt Cloud token | dbt Cloud API token. |

## Add a dbt source

Validio provides two types of dbt sources that you can add for monitoring dbt runs and tests: **dbt Model Run** and **dbt Test Result**.

To add a dbt source:

1. Navigate to **Sources** and click **+ New source**.
2. Under **Source type**, click **Data transformation** to select **dbt Model Run** or **dbt Test Result**.
3. Under **Config**,
   1. Select the valid **Credential**, or create a new credential to authenticate your connection.
   2. Select a **Project name** and **Job name**.
   3. Set the **Polling schedule** (cron expression in UTC), which is how frequently Validio checks for new dbt metadata.
4. Under **Source details**,
   1. Enter a **Name** for the source.
   2. (Optional) Add a **Description**.
   3. Add **Tags** to help group related sources or to use for routing notifications.
5. Click **Continue** to create the source.

You can view the summary of the source configuration.

> [!NOTE]
>
> Validio automatically infers the schema and defines default segmentation.
>
> * For dbt Model Run sources, the default segment is `model_id`.
> * For dbt Test Result sources, the default segments are `model_id` and `test_name`.
