# dbt

## Before you start

To connect dbt to Select Star, you will need...

* Permission to build the dbt project

{% hint style="info" %}
Select Star won't need any permissions for dbt directly, but you will need to build the dbt project and generate build artifacts.
{% endhint %}

Complete the following steps to connect dbt to Select Star.

1. [Determine what kind of dbt connection you need](#1.-determine-what-kind-of-dbt-connection-you-need)
2. [Connect dbt to Select Star](#2.-connect-dbt-to-select-star)

{% hint style="warning" %}
Note that in order to see changes to your dbt project reflected in Select Star after the initial connection, **you must** complete either [step 3](#3.-updating-build-artifacts-automatically) or [step 4](#4.-updating-build-artifacts-manually).
{% endhint %}

## 1. Determine what kind of dbt connection you need

Select Star can integrate with dbt via dbt cloud or via build artifacts (manifest.json, catalog.json, etc).

for DBT Cloud we require...

* a service token for the metadata api
* a job id for a custom job that will generate all the metadata we need
  * see [DBT Cloud - Setup a dbt Cloud Custom Job](/integrations/dbt/dbt-cloud.md#dbt-cloud-custom-job) for details about how to set up the job
* a `Read Only` and `Metadata Only` permission set

## 2. Connect dbt to Select Star

{% hint style="info" %}
If you are using multiple dbt projects and have cross-project dependencies see [dbt Project Dependencies](/integrations/dbt/dbt-project-dependencies.md).
{% endhint %}

Go to the Select Star **Settings**. Click **Data** in the sidebar, then **+ Add** to create a new Data Source.

![](/files/IP5pzA0NjiBfKRqyS8wu)

Choose **dbt** in the Source Type dropdown and then follow the instructions for how you want to connect:

{% content-ref url="/pages/MQoeDOVEP4yrkHgXgTM1" %}
[dbt Cloud](/integrations/dbt/dbt-cloud.md)
{% endcontent-ref %}

{% content-ref url="/pages/6HDe0KrWKWcvNOENCtHe" %}
[dbt Core (open source)](/integrations/dbt/dbt-core-open-source.md)
{% endcontent-ref %}

### Features

{% content-ref url="/pages/8HMlFQ7sJYR9PpNbffDd" %}
[dbt Tags](/integrations/dbt/dbt-tags-new.md)
{% endcontent-ref %}

{% content-ref url="/pages/zRjQfkCGTVO7Hb0RYkv1" %}
[dbt Tests](/integrations/dbt/dbt-tests-beta.md)
{% endcontent-ref %}


---

# 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.selectstar.com/integrations/dbt.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.
