> For the complete documentation index, see [llms.txt](https://docs.getdot.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getdot.ai/integrations/semantic-layers/cube.md).

# Cube

Dot answers through your Cube semantic layer, so every number matches your governed definitions.

If your team has invested in a [Cube](https://cube.dev) semantic layer, your metric logic already lives in one governed place. Connect it to Dot and Dot won't re-derive revenue from raw tables — it asks Cube, so its answers match every other tool built on the same definitions.

## What you need

* Your Cube **REST API endpoint**, for example `https://<deployment>.cubecloud.dev/cubejs-api/v1` (or your self-hosted equivalent)
* An **API token** your Cube deployment accepts

## Connect in Dot

1. Go to **Settings → Connections** and choose **Cube**.
2. Enter the API URL and the token, then connect.

Dot syncs your cubes — measures, dimensions, and joins — into its Model, where you activate the ones Dot should use and enrich them with descriptions.

## How Dot queries Cube

Questions are answered through Cube's REST API, never with raw SQL against the underlying warehouse. That means:

* **Pre-aggregations** accelerate Dot like any other Cube client.
* The **token's security context** applies, so Cube-side access rules keep working.
* Metric math has one home: change a definition in Cube and Dot follows automatically.


---

# 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.getdot.ai/integrations/semantic-layers/cube.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.
