# dbt Semantic Layer

{% embed url="<https://www.loom.com/share/4849e276a2f649a5b84538b062a33320?sid=dd7fa11e-a404-4274-a097-3045b65003f2>" fullWidth="true" %}
Demo of Dot on dbt
{% endembed %}

To connect you need admin access to **dbt cloud** and you need to have [setup the semantic layer](https://docs.getdbt.com/docs/use-dbt-semantic-layer/quickstart-sl).

## Create API token

1. Go to ⚙️ | Accout Settings

<figure><img src="https://3709841693-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCeRlmJf2y704TpjpubE1%2Fuploads%2FekEU1OUzaTjzGu9k1g4R%2Fgrafik.png?alt=media&#x26;token=6da10a9c-509b-4cd9-b8fa-231067f1dc68" alt=""><figcaption></figcaption></figure>

2. Click on Service Tokens

<div align="center"><figure><img src="https://3709841693-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCeRlmJf2y704TpjpubE1%2Fuploads%2FUURtAyIj4OlCgtzReZyw%2Fgrafik.png?alt=media&#x26;token=93d418aa-f4dc-4608-917d-6a871b3b0349" alt="" width="548"><figcaption></figcaption></figure></div>

3. Create new Token with permissions for `Semantic Layer` and `Metadata`

<figure><img src="https://3709841693-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCeRlmJf2y704TpjpubE1%2Fuploads%2FQY0MIW1JVKYn1JJf4n6H%2Fgrafik.png?alt=media&#x26;token=10247b4b-4a6c-4032-8afe-f3e80d77621c" alt=""><figcaption></figcaption></figure>

4. Copy and Save Generated Token

<figure><img src="https://3709841693-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCeRlmJf2y704TpjpubE1%2Fuploads%2FlQDrzORIrY6TlB2lb0lD%2Fgrafik.png?alt=media&#x26;token=4308a66a-c2a4-44d9-a77e-e0212f043e48" alt=""><figcaption></figcaption></figure>

## Get Environment ID

1. Go to Environments

<figure><img src="https://3709841693-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCeRlmJf2y704TpjpubE1%2Fuploads%2FCBcz8sV8Bj65fBrbtb9R%2Fgrafik.png?alt=media&#x26;token=461ba49f-bb15-4fc0-a5b8-08914987fbdd" alt=""><figcaption></figcaption></figure>

2. Click on your production environment and copy the last part of the url ( e.g. 12345)

<figure><img src="https://3709841693-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCeRlmJf2y704TpjpubE1%2Fuploads%2Fv6WiEKdxc4MNtGKuaUK4%2Fgrafik.png?alt=media&#x26;token=960d59ea-de87-4cdf-bc4b-8ca1a0eae8df" alt=""><figcaption></figcaption></figure>

## Get Your GraphQL URL

\
Depending on where your dbt account is hosted, you need to obtain a different url.

Here are the official docs on the different schema explorer/Graph QL URLs

{% embed url="<https://docs.getdbt.com/docs/dbt-cloud-apis/sl-graphql#dbt-semantic-layer-graphql-api>" %}

Example: `https://semantic-layer.cloud.getdbt.com/api/graphql`

## Allow Dot IPs

If your organization uses a firewall to manage dbt access, Dot will only access your dbtthrough the following IPs:

* `3.229.110.216`
* `3.122.135.165`
