> 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/business-intelligence/cube-core-integration.md).

# Cube Core

Euno's Cube Core integration ingests a zip of Cube schema YAML from self-hosted Cube Core deployments. Euno discovers cubes, views, measures, and dimensions, and enriches them with lineage to warehouse tables and columns.

{% hint style="info" %}
This integration is push-only: upload your Cube `model/` tree as a zip file. Euno does not call Cube APIs.
{% endhint %}

## Limitations

Euno currently supports Cube Core deployments connected to **Snowflake** only. Other warehouses, Cube Cloud, and JavaScript schema files are not supported.

## What Euno discovers

* **Cube deployment** — optional container when **Instance slug** is set
* **Cubes** — semantic models over warehouse tables
* **Views** — consumer-facing projections over cubes
* **Dimensions and measures** — under cubes or views
* **Lineage** — warehouse table and column dependencies, cube-to-cube joins, and view member aliases

For property and relationship details, see [Cube Core Integration Discovered Resources](/sources/business-intelligence/cube-core-integration/cube-core-integration-discovered-resources.md).

## Prerequisites

Before setting up a Cube Core source in Euno:

1. **Cube schema YAML** — Export or package your Cube `model/` directory as a `.zip` file. Files must be under `model/**/*.yml` or `model/**/*.yaml` and contain `cubes:` and/or `views:` at the root of each document.
2. **Jinja stubs (if needed)** — If your `sql_table` values use `COMPILE_CONTEXT` Jinja, configure **Security context** and **Custom context** in the source so Euno can render table names offline.

{% hint style="info" %}
Upload the complete `model/` tree when your deployment has joins or views that reference cubes defined in other YAML files. Partial uploads produce incomplete graphs.
{% endhint %}

## Setting up a Cube Core source in Euno

### Step 1: Access the Sources page

1. Navigate to the **Sources** page in Euno.
2. Click **Add New Source** and select **Cube Core**.

### Step 2: General configuration

Asterisk (\*) means a mandatory field.

| Configuration              | Description                                                                                                                                       |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Name**\*                 | Display name for this source (for example, `Cube Core - Production`).                                                                             |
| **Warehouse technology**\* | Warehouse type for the default Cube data source.                                                                                                  |
| **Snowflake host**\*       | Warehouse host or account locator for the default data source (for example, `JGB69604.us-west-2.aws` or `account.region.snowflakecomputing.com`). |
| **Default database**       | Default database for unqualified `sql_table` names on the default Cube data source.                                                               |
| **Default schema**         | Default schema for unqualified table names on the default Cube data source.                                                                       |
| **Instance slug**          | URI namespace for cube resources. When set, Euno also creates a `cube_deployment` container for this instance.                                    |
| **Instance display name**  | Optional label for the deployment container. Defaults to the instance slug.                                                                       |

### Step 3: Resource cleanup

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 a number of days before the most recent successful source integration run (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 **Advanced** to configure additional options:

| Configuration           | Description                                                                                                                                                 |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Data source mapping** | Map named Cube `data_source` values to warehouse hosts and default database/schema. Required for every non-default `data_source` referenced in your schema. |
| **Cube pattern**        | Include or exclude cubes by name using regular expressions. Defaults to including all cubes.                                                                |
| **View pattern**        | Include or exclude views by name using regular expressions. Defaults to including all views.                                                                |
| **Security context**    | Stub values for offline Jinja rendering of `COMPILE_CONTEXT.securityContext`. Supported keys: `tenant`, `deployment_id`, `team`, `environment`.             |
| **Custom context**      | Additional top-level `COMPILE_CONTEXT` keys for offline Jinja rendering (string values).                                                                    |

Each **data source mapping** entry includes:

| Field                    | Description                                                               |
| ------------------------ | ------------------------------------------------------------------------- |
| **Warehouse technology** | Warehouse type for this named data source.                                |
| **Snowflake host**       | Warehouse host for cubes that use this named data source.                 |
| **Default database**     | Default database for unqualified `sql_table` names on this data source.   |
| **Default schema**       | Default schema for unqualified table names on this data source.           |
| **Security context**     | Optional override of the top-level security context for this data source. |
| **Custom context**       | Optional override of the top-level custom context for this data source.   |

### Step 5: Save configuration

Click **Save**. Euno opens a modal with:

* Your **trigger secret** — copy and store it securely; it is shown only once
* The **`prepare-upload` endpoint URL** — for programmatic zip uploads

Use the trigger secret as a Bearer token in the `Authorization` header for `prepare-upload` calls.

**Rotating your trigger secret:** Open your Cube Core source on the **Sources** page and click **Reset Trigger Key** to generate a new secret. This invalidates the previous secret immediately.

## Uploading Cube schema YAML

### Preparing your upload

Package your Cube model tree as a single `.zip` file:

* Include YAML files under `model/**/*.yml` or `model/**/*.yaml`
* Each file must parse as YAML with a mapping root and contain a `cubes:` and/or `views:` section
* Upload exactly one `.zip` file per run

### Upload methods

#### Manual upload via UI

The easiest way to upload Cube schema YAML is through Euno's UI:

1. Open your Cube Core source on the **Sources** page.
2. Click **Upload Artifacts**.
3. Select your `.zip` file and start the run.

Euno parses the schema, emits Cube resources, and runs lineage enrichment to warehouse tables and columns. Check the run report for inventory counts, skipped files, and Jinja render results.

#### Programmatic upload (recommended for production)

For production workflows, upload your zip after Cube schema changes using the **`prepare-upload` endpoint**:

1. **Request a signed upload URL** — `POST` to `.../integrations/YOUR_INTEGRATION_ID/prepare-upload` with the zip filename and `Authorization: Bearer YOUR_TRIGGER_SECRET`
2. **Upload the zip** — `PUT` the file to the signed URL from the response
3. **Processing starts automatically** — no further API call is required

See reference implementations below:

**Python script**

Use a standalone Python script to zip and upload your Cube model tree [→ View Python Upload Guide](/sources/zip-artifact-python-upload.md)

**GitHub Actions**

Automate uploads when Cube schema YAML changes in your repository [→ View GitHub Actions Guide](/sources/business-intelligence/cube-core-integration/github-actions-upload.md)

{% hint style="info" %}
Euno performs offline Jinja2 rendering for `sql_table` values that contain `COMPILE_CONTEXT` references. Rendering uses only `COMPILE_CONTEXT` assembled from **Security context** and **Custom context**—control-flow constructs such as `{% if %}` work when they depend on those stub values. Cube runtime helpers and macros (for example `env_var()` or functions from `model/globals.py`) are not available, and query-compilation variables such as `{CUBE}` are not evaluated.
{% endhint %}


---

# 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 dynamically by asking a question.

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

```
GET https://docs.euno.ai/sources/business-intelligence/cube-core-integration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
