# dbt Core

Euno's dbt Core integration supports auto-discovery of [dbt resources](/sources/transformation-etl/dbt-core/dbt-integration-discovered-resources.md). It automates processing of dbt uploaded artifacts from completed runs. This allows for seamless data synchronization and analysis using the latest available dbt job runs.

## How It Works

The integration follows these steps:

1. **Outputs a url for uploading dbt artifacts**\
   The following artifacts can then be uploaded to Euno's endpoint:
   * `run_results.json`
   * `manifest.json`
   * `semantic_manifest.json`
   * `catalog.json`
2. **Process the Artifacts**
   * The integration processes the uploaded artifacts to extract relevant information and adds the [discovered](/sources/transformation-etl/dbt-core/dbt-integration-discovered-resources.md) [resources](/sources/transformation-etl/dbt-core/dbt-integration-discovered-resources.md) to Euno's data model.

## Setting up Euno's dbt Core Integration

### Step 1: Access the Sources Page

1. Navigate to the **Sources** page in the Euno application.
2. Click on the **Add New Source** button.

### Step 2: General Configuration

1. **Name**: Enter a name for your dbt Core source (e.g., "dbt - Marketing Models").
2. **Configuration Details**:
   1. **Build target:** The default build target to use when observing dbt resources. Consult the table below depending on the warehouse technology your dbt is run against.

<details>

<summary>Snowflake</summary>

The build target should follow the pattern: `<account_id>.<region>.<cloud provide>.snowflakecomputing.com`

For example:

* foo-1234.us-east-1.aws.snowflakecomputing.com
* bar-5678.us-west-2.gcp.snowflakecomputing.com

</details>

<details>

<summary>Trino</summary>

The build target should follow the pattern `trino.<region>.<gcloud provider>`

For example:

* trino.us-west-2.aws
* trino.us-east-2.gcp

</details>

<details>

<summary>Databricks</summary>

The build target should be the hostname of the databrick workspace

For example:

* 4200747832468935.5.gcp.databricks.com
* dbc-50e7cad0-c2f9.cloud.databricks.com
* adb-5555555555555555.19.azuredatabricks.net

</details>

<details>

<summary>Bigquery</summary>

The build target should just say `bigquery`

</details>

### Step 3: Resource Cleanup Options

To keep your data relevant and free of outdated resources, Euno provides automatic **resource cleanup** options. These settings determine when a resource should be removed if it is no longer detected by a source integration. For a detailed explanation see: [Resource Sponsorship in Euno](/developer-reference/technical-concepts/resource-sponsorship-and-cleanup-in-euno.md).

* **Time-Based Cleanup (default)**: Remove resources that were last detected X days before the most recent successful source integration run (user-defined X, default is 7 days).
* **Immediate Cleanup**: Remove resources not detected in the most recent successful source integration run.
* **No Cleanup**: Keep all resources indefinitely, even if they are no longer detected.

### Step 4: Advanced Settings (Optional)

Click on the '**Advanced**' section to display these additional configurations.

<table><thead><tr><th width="209">Configuration</th><th>Description</th></tr></thead><tbody><tr><td>Allow Processing Builds with a Partial Catalog</td><td><p>By default, Euno only observes dbt resources (e.g., models, sources, snapshots, and seeds) that have a corresponding entry in the <strong>catalog.json</strong> file. Checking this box will expand the scope to include all resources listed in the <strong>manifest.jso</strong>n file, even if they do not appear in the <strong>catalog.json</strong> file.</p><p><br><strong>Note:</strong> Resources without a matching entry in the <strong>catalog.json</strong> file will not have schema information available, as this data is exclusively pulled from the catalog. By default, the integration processes only builds with a complete, error-free <strong>catalog.json.</strong></p></td></tr><tr><td>Source Repository URL</td><td>The URL of the git repository where the dbt project is stored</td></tr><tr><td>Source Repository branch</td><td>The branch of the git repository where the dbt project is stored</td></tr><tr><td>Relative directory of the dbt project</td><td>Subdirectory within the git repository where the dbt project is stored</td></tr><tr><td>Mapping</td><td>Euno will ingest dbt resources to the database and schema stated in the manifest file, unless a database.schema mapping is added. In that case, the resource will be ingested to the database and schema stated in the value of the target.<br><br>example:<br>source: <code>analytics_v2</code>, target: <code>analytics</code> will map <code>`analytics_v2.analytics`</code> to <code>`analytics.analytics`</code><br><br>source: <code>r'/^(hive_metastore\..+)_spark$/</code>, target: <code>analytics</code> will map <code>hive_metastore.some_schema_spark</code> to <code>hive_metastore.some_schema.</code></td></tr></tbody></table>

### Step 5: Save Configuration

Click the **Save** button, and Euno will generate a trigger key. Please copy the endpoint url and the key. The key will disappear after copying you click "done".\\

## **Uploading artifacts to the integration**

To run the integration, you need to upload dbt artifacts.

Files to upload from your dbt build are:

* `run_results.json`
* `manifest.json`
* `catalog.json`
* `semantic_manifest.json` (optional)

The easiest way to upload dbt artifacts to the integration is through Euno's UI. Browser to the integration and click "upload artifacts" and upload a .zip file with the above artifacts.

To programatically upload the dbt artifacts after every successful run, which is recommended for production use-cases, see reference implementations below:

#### **Python Script**

Use a standalone Python script to zip and upload your dbt artifacts [→ View Python Upload Guide](/sources/transformation-etl/dbt-core/python-upload.md)

#### **GitHub Actions**

Automate your dbt builds and artifact uploads using GitHub Actions workflows [→ View GitHub Actions Guide](/sources/transformation-etl/dbt-core/github-actions-upload.md)

#### **Prefect**

Integrate with Prefect workflows for advanced orchestration and monitoring [→ View Prefect Integration Guide](/sources/transformation-etl/dbt-core/prefect-upload.md)

**Generating a new trigger URL key:** If you need to create a new trigger URL key, go to the **Sources** page and click on the three-dot menu to the right of the source you want to create a new key for. In the dropdown menu click on **Generate trigger URL.** The generated URL will include the new key.


---

# 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.euno.ai/sources/transformation-etl/dbt-core.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.
