# Elementary

Euno's Elementary integration surfaces active data quality incidents directly on the impacted resources (dbt models, dbt columns, warehouse tables, and columns). Elementary remains the source of truth for incidents — Euno retrieves incident payloads via Elementary Cloud's MCP API and computes a set of resource-level indicators for discovery and filtering.

Only **active** incidents are ingested:

* `open`
* `acknowledged`

Incidents in terminal states are not fetched, stored, or displayed.

### Setting up the Elementary integration

#### Overview

Elementary is a data quality monitoring platform built on top of dbt. It captures the results of dbt tests and elevates failing test runs into incidents tied to specific dbt models or columns. The Euno integration connects to Elementary Cloud via its MCP API, retrieves active incidents, and attaches them to the corresponding dbt model, dbt column, warehouse table, and column resources already present in Euno.

The Elementary integration does not discover or import warehouse hierarchy — it only enriches resources that already exist in Euno from other source integrations (typically a dbt or warehouse integration).

Only incidents originating from **dbt tests on model-type assets** are supported. Supported test types are built-in dbt tests (`not_null`, `unique`, `relationships`, `accepted_values`) and `dbt_utils` tests.

#### Step 1: Obtain Elementary Cloud credentials

1. Log in to your Elementary Cloud account.
2. Navigate to **Settings → API** (or your account's token management page).
3. Generate a new **API token** (bearer token).
4. Copy the token — it will be needed for Euno configuration and cannot be retrieved again.
5. Note your **Environment ID** — this identifies the Elementary environment whose incidents Euno will ingest. It is visible in the Elementary Cloud UI under your environment settings.

#### Step 2: Configure New Elementary Source in Euno

**Access the Sources Page**

1. Go to the **Sources** page in Euno.
2. Click **Add New Source** and select **Elementary** from the list of supported platforms.

**General Configuration**

Asterisk (\*) means a mandatory field.

| Configuration     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name\*            | Enter a name for your Elementary source (e.g., "Elementary - Data Quality").                                                                                                                                                                                                                                                                                                                                                                                                       |
| Bearer Token\*    | The API token generated in Step 1. Sent on every request as a `Bearer` authorization header. Stored securely.                                                                                                                                                                                                                                                                                                                                                                      |
| Environment ID\*  | The Elementary environment ID to query. Scopes all incident fetches to a single environment.                                                                                                                                                                                                                                                                                                                                                                                       |
| MCP Endpoint      | Base URL of the Elementary MCP API. Defaults to `https://prod.api.elementary-data.com/mcp/`. Change this only if your Elementary account uses a custom or self-hosted endpoint.                                                                                                                                                                                                                                                                                                    |
| Warehouse Mapping | Optional mapping of Elementary `database.schema` identifiers to Euno `database.schema` identifiers. Use this when Elementary reports warehouse coordinates that differ from those in Euno (e.g., due to connection aliases). Keys are matched case-insensitively against the combined `database.schema` string from the incident payload. Keys wrapped in `/…/` are treated as regular expressions. Example: `{"elem_db.prod": "euno_db.prod", "/elem_db\\.(.*)/": "euno_db.$1"}`. |

#### Step 3: Schedule

* Enable the Schedule option.
* Choose:
  1. **Weekly**: Set specific days and times.
  2. **Hourly**: Define the interval in hours (e.g., every 4 hours).

{% hint style="info" %}
**Recommended**: Schedule the Elementary integration to run frequently (every 1–4 hours) so that active incident state stays close to real-time. Manual runs are also supported.
{% endhint %}

#### Step 4: Resource Cleanup

The Elementary integration requires **Immediate Cleanup**.

* **Immediate Cleanup**: incidents not present in the most recent successful integration run are removed from all attached resources immediately. This keeps Euno's view aligned with the set of currently active incidents in Elementary.

{% hint style="warning" %}
Immediate Cleanup is the only supported cleanup mode for this integration.
{% endhint %}

#### Step 5: Save Configuration

Click the **Test & Save** button to complete the setup. Euno will:

1. Authenticate to the Elementary Cloud MCP API using the provided bearer token.
2. Verify access by fetching the current list of active incidents for the configured environment.
3. Save the configuration if validation passes.

If the test fails, check that the bearer token is valid and that the environment ID matches an environment visible in your Elementary Cloud account.

### Discovered Resources

The Elementary integration does not create new resource types. Instead, it enriches existing **dbt model**, **dbt column**, **table**, and **column** resources with active-incident properties. For detailed information about the enriched properties, see [elementary-discovered-resources](/sources/data-observability/elementary-integration/elementary-discovered-resources.md).


---

# 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/data-observability/elementary-integration.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.
