> For the complete documentation index, see [llms.txt](https://docs.euno.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.euno.ai/sources/analytics-notebooks/hex-semantic-project/hex-semantic-project-discovered-resources.md).

# Hex Semantic Project Discovered Resources

## Overview

The Hex Semantic Project integration discovers a Hex semantic project from uploaded dbt MetricFlow YAML files, together with the dbt semantic layer resources each Hex resource corresponds to. It discovers the following resources:

* Hex workspace (`hex_workspace`)
* Hex semantic project (`hex_semantic_project`)
* Hex semantic model (`hex_semantic_model`)
* Hex dimension (`hex_dimension`)
* Hex measure (`hex_measure`)
* dbt semantic model (`dbt_semantic_model`)
* dbt dimension (`dbt_dimension`)
* dbt metric (`dbt_metric`)

Hex resources use the URI prefix `hex`. The dbt resources use the same URIs as the dbt integration, built from the project `name` in `dbt_project.yml`, so they match the resources discovered by a dbt source for the same project.

## Resource hierarchy

```
Hex Workspace
└── Hex Semantic Project
    └── Hex Semantic Model
        ├── Hex Dimension
        └── Hex Measure
```

## Hex workspace (`hex_workspace`)

A single Hex workspace, observed for the workspace configured in the integration settings.

| Property  | Type   | Description                                  |
| --------- | ------ | -------------------------------------------- |
| `name`    | string | The workspace identifier from configuration. |
| `type`    | string | Always `hex_workspace`.                      |
| `subtype` | string | Always `hex_workspace`.                      |

**URI pattern**

```
hex.workspace.<workspace_id>
```

Example: `hex.workspace.5b1f9a2c-7d3e-4c1a-9e8b-2f6d0c4a7e11`

## Hex semantic project (`hex_semantic_project`)

A single Hex semantic project, observed for the semantic project configured in the integration settings.

| Property                | Type   | Description                                                            |
| ----------------------- | ------ | ---------------------------------------------------------------------- |
| `name`                  | string | The semantic project name from configuration.                          |
| `type`                  | string | Always `hex_semantic_project`.                                         |
| `subtype`               | string | Always `hex_semantic_project`.                                         |
| `semantic_project_type` | string | Type of semantic project. Currently always `dbt_metricflow`.           |
| `dbt_project`           | string | The dbt project name, read from the `name` field in `dbt_project.yml`. |

**URI pattern**

```
hex.<workspace_id>.semantic_project.<project_id>
```

Example: `hex.5b1f9a2c-7d3e-4c1a-9e8b-2f6d0c4a7e11.semantic_project.8d2e4f60-1a3b-4c5d-9e7f-0a1b2c3d4e5f`

## Hex semantic model (`hex_semantic_model`)

A Hex semantic model, discovered from the `semantic_models` section of the dbt MetricFlow YAML files. Only semantic models that have a `name`, a `model`, and `config.meta.hex` configuration are processed.

| Property         | Type   | Description                                                              |
| ---------------- | ------ | ------------------------------------------------------------------------ |
| `name`           | string | The semantic model name.                                                 |
| `type`           | string | Always `hex_semantic_model`.                                             |
| `subtype`        | string | Always `hex_semantic_model`.                                             |
| `description`    | string | Model description from YAML.                                             |
| `external_links` | list   | An **Open in Hex** link to the semantic model in the Hex semantic layer. |

**URI pattern**

```
hex.<workspace_id>.semantic_project.<project_id>.semantic_model.<semantic_model_name>
```

Example: `hex.5b1f9a2c-7d3e-4c1a-9e8b-2f6d0c4a7e11.semantic_project.8d2e4f60-1a3b-4c5d-9e7f-0a1b2c3d4e5f.semantic_model.orders`

## Hex dimension (`hex_dimension`)

A dimension of a Hex semantic model. Dimensions are discovered from both semantic model dimensions and entities:

* **Regular dimensions** are discovered from the `dimensions` section of semantic models. These have corresponding dbt dimensions and field-level lineage.
* **Entity-based dimensions** are discovered from the `entities` section of semantic models. Only entities with types `primary`, `unique`, `natural`, or `foreign` are processed. These do NOT have corresponding dbt dimensions or field-level lineage.

| Property      | Type   | Description                     |
| ------------- | ------ | ------------------------------- |
| `name`        | string | The dimension (or entity) name. |
| `type`        | string | Always `hex_dimension`.         |
| `subtype`     | string | Always `hex_dimension`.         |
| `description` | string | Dimension description.          |

**URI pattern**

```
hex.<workspace_id>.semantic_project.<project_id>.semantic_model.<semantic_model_name>.dimension.<dimension_name>
```

Example: `hex.5b1f9a2c-7d3e-4c1a-9e8b-2f6d0c4a7e11.semantic_project.8d2e4f60-1a3b-4c5d-9e7f-0a1b2c3d4e5f.semantic_model.orders.dimension.order_status`

## Hex measure (`hex_measure`)

A measure of a Hex semantic model. One Hex measure is observed for each dbt metric that Euno can associate with a single semantic model:

* Measures with `create_metric: true` in a semantic model.
* Standalone `simple` and `cumulative` metrics that reference a measure defined in a semantic model.
* Standalone `ratio` and `derived` metrics whose referenced metrics all resolve to the same semantic model.

| Property      | Type   | Description                   |
| ------------- | ------ | ----------------------------- |
| `name`        | string | The metric (or measure) name. |
| `type`        | string | Always `hex_measure`.         |
| `subtype`     | string | Always `hex_measure`.         |
| `description` | string | Measure description.          |

**URI pattern**

```
hex.<workspace_id>.semantic_project.<project_id>.semantic_model.<semantic_model_name>.measure.<metric_name>
```

Example: `hex.5b1f9a2c-7d3e-4c1a-9e8b-2f6d0c4a7e11.semantic_project.8d2e4f60-1a3b-4c5d-9e7f-0a1b2c3d4e5f.semantic_model.orders.measure.total_revenue`

## dbt semantic model (`dbt_semantic_model`)

The dbt semantic model that corresponds to each valid Hex semantic model, observed to maintain lineage. The Hex Semantic Project integration sets only the properties below; other properties come from the dbt integration when the same dbt project is integrated.

| Property  | Type   | Description                  |
| --------- | ------ | ---------------------------- |
| `name`    | string | The semantic model name.     |
| `type`    | string | Always `dbt_semantic_model`. |
| `subtype` | string | Always `dbt_semantic_model`. |

**URI pattern**

```
dbt.<dbt_project_name>.semantic_model.<dbt_project_name>.<semantic_model_name>
```

Example: `dbt.jaffle_shop.semantic_model.jaffle_shop.orders`

## dbt dimension (`dbt_dimension`)

The dbt dimension that corresponds to each regular dimension (from the `dimensions` section) in a valid semantic model. Entity-based dimensions do NOT have corresponding dbt dimension resources. The Hex Semantic Project integration sets only the properties below.

| Property  | Type   | Description             |
| --------- | ------ | ----------------------- |
| `name`    | string | The dimension name.     |
| `type`    | string | Always `dbt_dimension`. |
| `subtype` | string | Always `dbt_dimension`. |

**URI pattern**

```
dbt.<dbt_project_name>.semantic_model.<dbt_project_name>.<semantic_model_name>.dimension.<dimension_name>
```

Example: `dbt.jaffle_shop.semantic_model.jaffle_shop.orders.dimension.order_status`

## dbt metric (`dbt_metric`)

The dbt metric that corresponds to each Hex measure: measures with `create_metric: true` and the standalone metrics listed under [Hex measure](#hex-measure-hex_measure). The Hex Semantic Project integration sets only the properties below.

| Property  | Type   | Description          |
| --------- | ------ | -------------------- |
| `name`    | string | The metric name.     |
| `type`    | string | Always `dbt_metric`. |
| `subtype` | string | Always `dbt_metric`. |

**URI pattern**

```
metric.<dbt_project_name>.<metric_name>
```

Example: `metric.jaffle_shop.total_revenue`

## Relationships

Each row is one relationship edge, written in the canonical direction for its family. Use the predicate in each heading to search for these relationships in EQL.

### Containment (`has parent` / `has child`)

| Source type            | Relationship | Target type            | Notes |
| ---------------------- | ------------ | ---------------------- | ----- |
| `hex_semantic_project` | has parent   | `hex_workspace`        |       |
| `hex_semantic_model`   | has parent   | `hex_semantic_project` |       |
| `hex_dimension`        | has parent   | `hex_semantic_model`   |       |
| `hex_measure`          | has parent   | `hex_semantic_model`   |       |

### Lineage (`has upstream` / `has downstream`)

| Source type          | Relationship | Target type          | Notes                                      |
| -------------------- | ------------ | -------------------- | ------------------------------------------ |
| `hex_semantic_model` | has upstream | `dbt_semantic_model` | The dbt semantic model with the same name. |

### Field-level lineage (`has upstream_fields` / `has downstream_fields`)

| Source type     | Relationship         | Target type     | Notes                                                                              |
| --------------- | -------------------- | --------------- | ---------------------------------------------------------------------------------- |
| `hex_dimension` | has upstream\_fields | `dbt_dimension` | Regular dimensions only.                                                           |
| `hex_measure`   | has upstream\_fields | `dbt_metric`    | The dbt metric with the same name.                                                 |
| `hex_measure`   | has upstream\_fields | `hex_measure`   | For `ratio` and `derived` metrics: the Hex measures of the metrics they reference. |

{% hint style="info" %}
Entity-based dimensions (from semantic model entities) do not have cross-platform lineage as they don't have corresponding dbt dimension resources.
{% endhint %}

## Usage in EQL

```
# Hex semantic models built on a given dbt semantic model
type = 'hex_semantic_model' AND has upstream(uri = '<dbt-semantic-model-uri>')

# Hex measures that derive from a given dbt metric
type = 'hex_measure' AND has upstream_fields(uri = '<dbt-metric-uri>')
```

## Known limitations

* Metrics of other types (for example `conversion` metrics), metrics whose measure is not defined in any processed semantic model, and metrics that reference metrics from more than one semantic model are not observed.
* Semantic models without `config.meta.hex` configuration are skipped.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.euno.ai/sources/analytics-notebooks/hex-semantic-project/hex-semantic-project-discovered-resources.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
