Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions docs-mintlify/docs/explore-analyze/charts/chart-types/kpi.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Displays a single value from your query result.
| **Field** | The measure or dimension to display |
| **Row** | Which row of the result to read from |
| **Format** | Number formatting (currency, percent, etc.) |
| **Font size / color** | Text appearance |
| **Alignment** | Left, center, or right |

See [Styling blocks](#styling-blocks) below for font size, color, background, and alignment.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit (conciseness): this "See [Styling blocks] below…" pointer is repeated five times (lines 32, 46, 67, 84, 100), three of them verbatim. docs-mintlify/CLAUDE.md asks for "say it once" — the Styling blocks table already lists which controls each block type has, so it's the single source of truth. Consider dropping the four per-block pointers and instead adding one line right before the block list (near the "Block types" heading) saying every block also has a Style panel, documented in Styling blocks. Purely editorial — the content itself is a genuine improvement over the old vague Fields-table rows.


{/* TODO screenshot: Number block (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}

Expand All @@ -42,7 +42,8 @@ Displays a current value alongside a previous value with a calculated difference
| **Current field / row** | The primary value |
| **Previous field / row** | The value to compare against — can be a different column or a different row from the same column |
| **Difference format** | Absolute, percentage, or both |
| **Positive color / Negative color** | Colors applied based on whether the change is positive or negative |

See [Styling blocks](#styling-blocks) below for the positive/negative/neutral colors applied based on the direction of change.

To compare to a static goal, add a column to your query that always returns the same number (e.g. a calculated field with a constant), then select it as the **Previous** field.

Expand All @@ -63,6 +64,8 @@ Shows a value relative to a target as a progress bar or circle. Useful for goal
To compare against a static number like a quarterly goal, add a calculated field that always returns that number and use it as the **Target** field.
</Tip>

See [Styling blocks](#styling-blocks) below for background and alignment.

{/* TODO screenshot: Progress bar block (bar style) and circle style (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}

### Sparkline
Expand All @@ -78,6 +81,8 @@ Renders a compact trend chart — either a bar or line — within the KPI tile.
| **Max points** | Limits the number of data points rendered |
| **Colors** | Line/fill colors |

See [Styling blocks](#styling-blocks) below for background and alignment.

{/* TODO screenshot: Sparkline block showing a trend line (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}

### Text
Expand All @@ -92,8 +97,26 @@ Use text blocks for short labels and headings inside the KPI. For complex layout

A free-form HTML block rendered inside the KPI tile. Use this for advanced custom layouts that go beyond what the other block types support.

See [Styling blocks](#styling-blocks) below for background and alignment.

{/* TODO screenshot: HTML block with custom content (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}

## Styling blocks

Every block has a **Style** panel with alignment controls — horizontal (left, center, right) and vertical (top, middle, bottom) — for positioning its content within the block's space.

Most block types also get a **Background** color, painted behind that block only; leave it unset to show the tile's own background through. Some block types add colors of their own:

| Block | Style controls |
|---|---|
| **Number** | Value color and background (linked as a pair), font size |
| **Comparison** | Positive / negative change colors, and a neutral color paired with the background |
| **Progress bar** | Background |
| **Sparkline** | Background (the sparkline's own line/fill colors are set in the Fields tab) |
| **HTML** | Background |

Text blocks don't have a background or color control — style them directly with Markdown/HTML.

## Layout controls

KPI tiles have a layout panel that controls how blocks are arranged:
Expand Down
31 changes: 21 additions & 10 deletions docs-mintlify/docs/explore-analyze/charts/chart-types/pie.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,36 @@ description: Show how a single measure is distributed across a small number of c

Pie charts divide a circle into slices proportional to each category's share of the total. Best for communicating part-to-whole proportions to a broad audience when you have a small number of clearly distinct categories (typically five or fewer).

## Variants
## Shape

### Pie
In the Style tab, toggle **Shape** between **Pie** and **Donut**. Donut cuts a hollow center out of the circle, which can be used to surface a summary value via a [KPI](/docs/explore-analyze/charts/chart-types/kpi) tile on a dashboard, or simply to reduce visual density.

Standard filled circle. Each slice's arc length is proportional to its value.
{/* Screenshot: pie and donut shape toggle side by side, same data. Place directly below this heading. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}

{/* Screenshot: pie chart — total revenue split by product category (5 slices with a legend). Place directly below this heading, half-width centered or side-by-side with donut. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}
## Data labels

### Donut
In the Style tab's **Data labels** section, toggle any combination of **Value**, **Category**, and **Percent** to show them directly on each slice. Percent is each slice's share of the total. Value and Percent each have their own number format, set from the format button next to their toggle.

A pie with a hollow center. Increase the **Inner radius** value in the Style tab to any non-zero value to switch to a donut. The hollow center can be used to surface a summary value via a [KPI](/docs/explore-analyze/charts/chart-types/kpi) tile on a dashboard, or simply to reduce visual density.
Once a label is on, you can also set:

{/* Screenshot: donut chart — same data as the pie variant, with inner radius applied. Place directly below this heading, half-width centered or side-by-side with pie. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}
- **Position** — **Inside** the slice or **Outside** it, with a leader line
- **Font size**

## Inner radius
{/* Screenshot: pie chart with Value + Percent labels shown outside the slices. Place directly below this heading. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}

Drag the **Inner radius** slider in the Style tab or enter a pixel value. Setting it to `0` returns to a full pie.
## Concentric rings

{/* Screenshot: Style tab with the Inner radius control highlighted. Place inline, 50% width, right-aligned. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}
A pie can only size its slices by one dimension. When your query has two or more dimensions, every dimension past the first draws as its own ring — one ring per dimension, nested outward from the center, each ring broken down by the ring inside it — instead of being dropped.

Reorder rings by dragging them in the **Rings** section of the Fields tab; the innermost ring also sets each slice's color. Only the outermost ring's measure total is exact — a measure that isn't additive (e.g. a count distinct) can't be summed correctly across inner rings, and the builder shows a warning when that's the case.

Data labels on a multi-ring chart can be limited to the **Outer ring** or shown on **All rings**, from the **Rings** control next to Position and Font size in the Style tab. Inner rings only ever show the Category label — Value and Percent at inner depths would need per-ring aggregation.

{/* Screenshot: a two-dimension pie rendered as concentric rings (e.g. region outer ring, product category inner ring). Place directly below this heading. (hidden — replace this comment with <Frame><img src="..." /></Frame> when image is ready) */}

## Tooltips

By default, hovering a slice shows every column from your query. Use the **Tooltips** control in the Fields tab to show all fields, one field, or none.

## Color and slice ordering

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ The available operators depend on the type of the underlying dimension:
|---|---|
| **String** | `is`, `is not`, `contains`, `not contains`, `starts with`, `not starts with`, `ends with`, `not ends with`, `is null`, `is not null` |
| **Number** | `is`, `is not`, `greater than`, `greater than or equal`, `less than`, `less than or equal`, `is null`, `is not null` |
| **Time** | `is`, `is not`, `before date`, `before or on date`, `after date`, `after or on date`, `between`, `relative date`, `is null`, `is not null` |
| **Time** | `is`, `is not`, `before date`, `before or on date`, `after date`, `after or on date`, `between`, `relative date`, `in`/`not in the month`, `in`/`not in the quarter`, `in`/`not in the year`, `is null`, `is not null` |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

`in`/`not in the month` reads as two operators named in and not in the month — the shared the month suffix isn't visible in the code spans. The prose immediately below spells them out in full (in the month / in the quarter / in the year), so the table contradicts it. Spell them out here too:

Suggested change
| **Time** | `is`, `is not`, `before date`, `before or on date`, `after date`, `after or on date`, `between`, `relative date`, `in`/`not in the month`, `in`/`not in the quarter`, `in`/`not in the year`, `is null`, `is not null` |
| **Time** | `is`, `is not`, `before date`, `before or on date`, `after date`, `after or on date`, `between`, `relative date`, `in the month`, `not in the month`, `in the quarter`, `not in the quarter`, `in the year`, `not in the year`, `is null`, `is not null` |


The `in the month` / `in the quarter` / `in the year` operators (and their negations) match a fixed calendar period — pick a month, quarter, or year and every row in that period matches, regardless of when the dashboard is viewed. This differs from `relative date` values like `this month`, which resolve against the current date each time the dashboard loads.

### Single vs. multiple selection

Expand Down Expand Up @@ -68,6 +70,10 @@ Empty, `null`, or unresolvable attribute values are skipped — the filter falls

The user attribute default only seeds the filter's *initial* value. Viewers can still change the filter unless its [visibility](#visibility) is set to **Disabled**, in which case the resolved attribute value is locked in for that viewer. Values passed via URL parameters also take precedence over user attribute defaults, so deep links continue to work.

### Bookmarking and sharing

On a published dashboard, changing a filter's value updates the page URL to match. A viewer can bookmark or share that URL, and opening it re-applies the same filter values — no extra setup required.

### Faceted filters

When multiple filters target dimensions from the same semantic view, you can mark them as **faceted**. Faceted filters scope each other's value lists — selecting a value in one filter narrows the options shown in the others, so viewers only see combinations that exist in the data.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,13 @@ period always aligns exactly with the current buckets. A measure can have
several comparisons active at once, such as month over month and year over
year side by side.

The menu is also available when the query has no time dimension in its
results, as long as exactly one time dimension is used as a filter with a
start and end date. Cube reads the comparison period from that filter's own
date range instead of from a grouped column — a query filtered to `Q1 2026`
offers **Previous period** as `Q4 2025`, for example — so a report with no
time column can still compare against the preceding window.

Each comparison adds derived columns next to the measure. Choose which ones
to show under **Comparison columns** in the same menu:

Expand Down Expand Up @@ -268,7 +275,7 @@ Two indicators next to each result describe the data behind it.

## Editing Semantic SQL by hand

You can edit the Semantic SQL directly in the editor to refine a query — for example, to add a `WHERE` clause, change `GROUP BY` order, or apply a different sort. After making changes, click **Save and Run** to apply them to the query and refresh the results, or **Discard** to revert.
You can edit the Semantic SQL directly in the editor to refine a query — for example, to add a `WHERE` clause, change `GROUP BY` order, or apply a different sort. After making changes, click **Save and Run** to apply them to the query and refresh the results, or **Discard** to revert. **Save and Run** also reformats the SQL for readability.

<Frame>
<img src="https://static.cube.dev/docs/explore-analyze/workbooks/edit-semantic-sql-v2.png" />
Expand Down
16 changes: 15 additions & 1 deletion docs-mintlify/docs/integrations/mcp-server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ Model Context Protocol (MCP) is an open standard that enables AI assistants to s
Cube hosts an MCP server endpoint for your tenant. MCP clients connect over HTTPS and authenticate via OAuth.

- **Endpoint:** `https://<cube-mcp-server-host>/api/mcp`
- **Centralized endpoint:** `https://<console-domain>/mcp` — one fixed URL, on the Cube
Cloud console domain rather than your tenant's own host, that proxies to the same
server. Use it for MCP connector directories and clients that require one server URL
registered up front, since the per-tenant endpoint above can vary by region or BYOC
domain.
Comment on lines +25 to +29

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two issues in this bullet:

  1. Naming convention violation. docs-mintlify/CLAUDE.md says "Cube Cloud — legacy naming, do not use in new content". This is the only occurrence of "Cube Cloud" in the file (it only escapes grep because the line wrap splits it across lines 25–26).

  2. The placeholder defeats the feature. The value proposition is "one fixed URL … for clients that require one server URL registered up front", but the reader is given <console-domain> with no way to resolve it. If the URL really is fixed and public, spell it out; if it varies, say where to find it (e.g. "the host you see in your browser when signed in to Cube").

Suggested change
- **Centralized endpoint:** `https://<console-domain>/mcp` — one fixed URL, on the Cube
Cloud console domain rather than your tenant's own host, that proxies to the same
server. Use it for MCP connector directories and clients that require one server URL
registered up front, since the per-tenant endpoint above can vary by region or BYOC
domain.
- **Centralized endpoint:** `https://<console-domain>/mcp` — one fixed URL, on the Cube
console domain (the host in your browser's address bar when you're signed in) rather
than your tenant's own host, that proxies to the same server. Use it for MCP connector
directories and clients that require one server URL registered up front, since the
per-tenant endpoint above can vary by region or BYOC domain.

- **OAuth discovery:** `https://<cube-mcp-server-host>/.well-known/oauth`
- **OAuth flow:** Authorization Code + PKCE, `client_id` = `cube-mcp-client`, scope = `mcp-agent-access`
- **Deployment selection:** On connect, the client lands on the tenant **default deployment** set by your admin (or the first deployment you can access). Clients can also target a specific deployment and agent per request — see [Select a deployment and agent](#select-a-deployment-and-agent).
Expand Down Expand Up @@ -211,7 +216,7 @@ neither `listDeployments` nor the `chat` selection can reach an excluded deploym

## Available actions

The MCP server exposes 16 tools, grouped below.
The MCP server exposes 20 tools, grouped below.

Every tool runs as the authenticated user. Queries respect the same
[permissions][ref-roles] as the rest of Cube, including row-level security — MCP is a new
Expand All @@ -232,6 +237,7 @@ a dashboard or your data model happens without an explicit approval.
| `listDeployments` | Lists the deployments and agents you can reach over MCP. |
| `chat` | Asks a question of a Cube agent, optionally targeting a specific deployment and agent. |
| `loadQueryResults` | Paginates through the results of a previous query. |
| `getDeploymentEnv` | Lists a deployment's environment variables, with secret-looking values redacted. Read-only — it cannot change them. |

See [Select a deployment and agent](#select-a-deployment-and-agent) for how these three
work together.
Comment on lines +240 to 243

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a fourth row makes the sentence below stale — "these three work together" now has no clear referent, and getDeploymentEnv has nothing to do with deployment/agent selection, so it shouldn't be swept into that cross-reference.

Suggested change
| `getDeploymentEnv` | Lists a deployment's environment variables, with secret-looking values redacted. Read-only — it cannot change them. |
See [Select a deployment and agent](#select-a-deployment-and-agent) for how these three
work together.
| `getDeploymentEnv` | Lists a deployment's environment variables, with secret-looking values redacted. Read-only — it cannot change them. |
See [Select a deployment and agent](#select-a-deployment-and-agent) for how
`listDeployments`, `chat`, and `loadQueryResults` work together.

Separately: this group's table has no Access column, so getDeploymentEnv's read-only status is smuggled into the description. And unlike the data-model group, there's no note on who can call it. Environment variables are sensitive even redacted (hostnames, database/account names, bucket paths), and "secret-looking" is a heuristic, not a guarantee. If the tool is role-gated, say so; if it isn't, that's worth stating explicitly too.

Expand All @@ -246,6 +252,13 @@ work together.
Call `searchDataModel` before `runQuery` to find exact view and member names rather than
guessing them.

### Pre-aggregations

| Tool | Description | Access |
| --- | --- | --- |
| `getPreAggregationStatus` | Lists the data model's pre-aggregations with their definitions and, for each, how many partitions exist, how many have been built, when the newest build landed, and the error if a build failed. | Read-only |
| `buildPreAggregation` | Queues an on-demand build of one pre-aggregation and returns once it's accepted; poll `getPreAggregationStatus` for the result. Runs real queries against your data source, so it consumes warehouse resources. | Write |

### Dashboard authoring

These tools build [workbooks][ref-workbooks] and [dashboards][ref-dashboards]
Expand Down Expand Up @@ -277,6 +290,7 @@ default. Users without it never see them.
| `writeDataModelFile` | Creates or overwrites a model source file on the dev branch (whole-file replacement). Recompiles the model and reports `valid` plus any `validationError`. | Destructive — prompts |
| `deleteDataModelFile` | Deletes a model source file on the dev branch. | Destructive — prompts |
| `getDataModelChanges` | Shows the diff of the dev branch against its parent — the pending changes, for review before committing. | Read-only |
| `getBranchDiff` | Shows what any branch changed against an arbitrary base (the deploy branch by default) — the changed-file list with insertion/deletion counts plus the unified diff. Broader than `getDataModelChanges`, which only compares your own dev branch to its immediate parent. | Read-only |

#### How model edits stay safe

Expand Down
8 changes: 8 additions & 0 deletions docs-mintlify/reference/data-modeling/view.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,14 @@ value's grain, not a range — `is yesterday` matches yesterday only (e.g.
`is this month` matches the current month. For a rolling window, use `between`
with two bounds.

A date or time member also accepts `in the month`, `in the quarter`, `in the
year`, and their negations `not in the month`, `not in the quarter`, `not in
the year`. These take a single fixed date (e.g. `"2026-03-01"`) and match
every row whose value falls in that date's calendar month, quarter, or year —
`DATE_TRUNC('quarter', created_at) = DATE_TRUNC('quarter', DATE '2026-03-01')`.
Unlike `is this month`, the reference date is fixed rather than resolved
against the current date on every run.
Comment on lines +383 to +389

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The canonical operator list at line 368–373 presents itself as the complete set ("what you see in the filter bar is what you type: is, is not, … is not null") and doesn't include the six new operators. A reader scanning for accepted values will stop at that list and never reach this paragraph — worth adding them there too (this paragraph can then just carry the semantics).

Also: the paragraph doesn't say whether these take value or values. Every other operator in this section is explicit about that, and the entry gets dropped with a console warning if you guess wrong.


##### Relative date values

A `between` filter always takes an explicit two-element `[start, end]` pair.
Expand Down
Loading