# Conéctate a dbt

Once you’ve set up the initial data warehouse connection, you can add dbt jobs linked to the warehouse account.

{% hint style="info" %}
**NOTE:** this requires `Job Viewer` role access to a dbt Cloud account.
{% endhint %}

## Adding DBT

1. In the **Connections** tab, click on the connection that should have linked dbt jobs.
2. Go to the **dbt connections** section and click the **Add dbt connection** button.<br>

   <figure><img src="https://content.gitbook.com/content/wI8nYxt7RQv62I15Xc6n/blobs/1xVdSp4bGSGVyaOQ7sj6/Screenshot%202023-06-06%20at%2012.43.43%20PM.png" alt="" width="375"><figcaption></figcaption></figure>
3. Fill in the form with the required details. See below for additional details.<br>

   <figure><img src="https://content.gitbook.com/content/wI8nYxt7RQv62I15Xc6n/blobs/0vyO2WncSm4z9cZh6e8l/Screenshot%202023-06-06%20at%2012.45.41%20PM.png" alt=""><figcaption></figcaption></figure>

## Form Details

<details>

<summary>Account and job ID</summary>

In dbt Cloud, navigate to the **Jobs** list under the **Deploy** menu. Click on the job that you want to connect to Arcwise (if you have multiple jobs, please select the job that builds your dbt docs, i.e. it includes a dbt docs generate step). The URL should be in the form&#x20;

`https://cloud.getdbt.com/next/deploy/[ACCOUNT-ID]/projects/[PROJECT_ID]/jobs/[JOB_ID]`

Copy and paste the account and job numbers into the Arcwise form.

![](https://content.gitbook.com/content/wI8nYxt7RQv62I15Xc6n/blobs/ITWDVAqaiKHd1iExHXH2/Screenshot%202023-06-06%20at%2012.49.36%20PM.png)

</details>

<details>

<summary>Service token</summary>

See instructions in [dbt docs for generating a service token](https://docs.getdbt.com/docs/dbt-cloud-apis/service-tokens). The token must have access to both the **Metadata API** and **Job Admin**.

</details>

<details>

<summary>Semantic Layer Proxy URL</summary>

If you want to allow Arcwise to use [dbt metrics](https://docs.getdbt.com/docs/build/metrics), then you’ll need to link Arcwise to the dbt Semantic Layer. Follow the [semantic layer setup instructions from the dbt docs](https://docs.getdbt.com/docs/use-dbt-semantic-layer/setup-dbt-semantic-layer) (if you haven’t already) and paste the proxy URL from your job’s environment into Arcwise.

</details>

## Indexing

After the dbt connection has been successfully saved, navigate to the “Tables” tab and you should see the models and metrics belonging to your dbt job.

{% hint style="info" %}
By default, Arcwise will index all models and metrics linked to the job that have not been marked as hidden from dbt docs. To hide things from Arcwise, you can set the `docs` config to `show: false` - please see the [official dbt docs](https://docs.getdbt.com/reference/resource-configs/docs#mark-a-model-as-hidden) for how to do this for an individual model or entire folders.
{% endhint %}
