# 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="/files/wXzobueO7gWpRw5cLgHN" alt=""><figcaption></figcaption></figure>

2. Click on Service Tokens

<div align="center"><figure><img src="/files/dqcWFif27OO8JTldn7qT" alt="" width="548"><figcaption></figcaption></figure></div>

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

<figure><img src="/files/CZj09uCWSX8bOMD4Y9xh" alt=""><figcaption></figcaption></figure>

4. Copy and Save Generated Token

<figure><img src="/files/gdFCIdcgouu4gXgbzMJX" alt=""><figcaption></figcaption></figure>

## Get Environment ID

1. Go to Environments

<figure><img src="/files/LLooccvw0I1mITM4NvQl" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/aV8QNUBZ6C1HOb6SJIzL" 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`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.getdot.ai/integrations/semantic-layers/dbt-semantic-layer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
