Skip to content
Merged
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
14 changes: 14 additions & 0 deletions docs-mintlify/admin/connect-to-data/data-sources/clickhouse.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,20 @@ module.exports = {

</CodeGroup>

## Query attribution

Cube sets the ClickHouse [`query_id`](https://clickhouse.com/docs/operations/system-tables/query_log)
of every statement it runs to `<cube-query-id>-<uuid>`, where `<cube-query-id>` is the
identifier shown for the query in Query History and `<uuid>` is generated per statement, so
one Cube query matches as many rows as it ran statements. Use it to trace a Cube query to the
statements it produced in ClickHouse:

```sql
SELECT query_id, query, event_time
FROM system.query_log
WHERE query_id LIKE '<cube-query-id>%'
```

## Additional Configuration

You can connect to a ClickHouse database when your user's permissions are
Expand Down
24 changes: 24 additions & 0 deletions docs-mintlify/admin/deployment/auto-suspension.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,30 @@ it's not recommended to choose anything below 1 hour.
The deployment will temporarily become unavailable for reconfiguration; this
usually takes less than a minute.

## Checking whether a deployment is suspended

Go to **Admin → Deployments**. The **Status** column shows whether each
deployment is currently suspended, without opening it.

<Warning>

Opening a deployment in Cube resumes it, so browsing to a deployment is not a
way to check whether it was suspended. The Deployments page reads stored state
and leaves the deployment alone.

</Warning>

A deployment shows **Always on** when it never auto-suspends: a
[Multi-cluster deployment][ref-prod-multi-cluster], or a
[Dedicated deployment][ref-deployment-prod-cluster] with auto-suspension turned
off.

To find deployments that are unused, rather than merely suspended right now, go
to **Billing → Cost and Usage** and group by deployment: for a
[Shared deployment][ref-deployment-dev-instance],
[CCU][ref-deployment-pricing] corresponds to the hours it was allocated. Like
the Deployments page, this reads stored data and resumes nothing.

## Resuming a suspended deployment

To resume a suspended deployment, send a query to Cube using the API or by
Expand Down
5 changes: 5 additions & 0 deletions docs-mintlify/admin/deployment/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ the&nbsp;**Cube Cloud** logo in the top left corner.
<img src="https://ucarecdn.com/cdd5831a-a8f8-4342-bc3e-25aab2c04a5b/" />
</Frame>

With more than one deployment, an admin can pin one as the account-wide default from its
row's&nbsp;**⋯**&nbsp;menu (**Set as default** / **Remove as default**). This is what a user
lands on when they open Cube without a deployment in the URL and haven't set their own
[default deployment](/docs/preferences#default-deployment) or previously switched deployments.

## Creating a new deployment

Creating a new deployment is an essential prerequisite to running a Cube
Expand Down
88 changes: 88 additions & 0 deletions docs-mintlify/admin/monitoring/alerts.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
title: Alerts
description: Set up email alerts for API outages, database timeouts, pre-aggregation failures, and build completions in Cube.
---

Alerts notify you by email when something happens in your account: an API goes
down, a database stops responding in time, a pre-aggregation build fails, or a
build finishes.

<Note>

Available on [Premium and above plans](https://cube.dev/pricing).

</Note>

## Manage alerts

Click **Alerts** in the sidebar to see every alert configured on the account. Click
**New alert** to add one, or use the edit and delete icons on a row to change or remove
an existing alert.

On plans below [Enterprise](https://cube.dev/pricing), only account administrators can
manage alerts. On the Enterprise plan, access also follows the `AlertsCreate`,
`AlertsRead`, `AlertsUpdate`, and `AlertsDelete` actions. Administrators always have
access, and the built-in Developer and AIBI Developer roles carry all four. The same four
actions also govern [budgets](/admin/account-billing/budgets).

<Note>

These four actions are not among the ones you can pick when you build a [custom
role][ref-custom-roles]. To grant them, assign a built-in Developer or AIBI Developer
role.

</Note>

## Event types

Each alert watches a single event type:

| Event type | What it detects | Resolved email |
| --- | --- | --- |
| **API outages** | The API stops responding | Yes |
| **Database response timeouts** | The database takes too long to answer | Yes |
| **Pre-aggregation build failures** | A [pre-aggregation](/admin/monitoring/pre-aggregations) build fails | Yes |
| **Build completed** | A build reaches a terminal state | No |
| **All** | Every event type above | Per event type |

The first three are conditions: Cube emails you when the condition starts, then emails
you again with a `Resolved —` subject prefix when it clears. While a condition persists,
Cube does not re-send the same alert for a while — 1 hour for API outages and database
response timeouts, 3 hours for pre-aggregation build failures.

<Warning>

**Build completed** fires when a build finishes, whether it succeeded or failed. The
subject line reads `Build finished with status: <status>`. It is a point-in-time event,
so it has no resolved email.

</Warning>

## Deployments

An alert applies either to **All** deployments in the account, or to a **Specific** set
you pick. Choosing **Specific** requires at least one deployment.

## Recipients

Under **Send alerts to**, pick either **All users on this account** or **Specific users**.
Under **Also send to**, add any number of custom email addresses; these are additive, and
a custom address on its own is a valid set of recipients.

<Note>

**All users on this account** only reaches users who have signed in at least once. Users
who were invited but never signed in do not receive alerts.

</Note>

## Delivery

Alerts are delivered by email only — there is no Slack, webhook, or PagerDuty delivery.
[Scheduled refresh notifications](/docs/explore-analyze/notifications), which cover
dashboard refresh outcomes, are a separate feature with its own delivery channels.

To alert from your own observability stack instead, export telemetry with [monitoring
integrations](/admin/monitoring/monitoring-integrations).

[ref-custom-roles]: /admin/users-and-permissions/custom-roles
3 changes: 2 additions & 1 deletion docs-mintlify/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,8 @@
"admin/monitoring/monitoring-integrations/grafana-cloud",
"admin/monitoring/monitoring-integrations/new-relic"
]
}
},
"admin/monitoring/alerts"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ Stages come from shared node names rather than from a stage field: rows `A → B

A row with a blank endpoint, or a value of zero or less, is not a flow and is left out — a sankey cannot draw a ribbon with no thickness.

Cyclic data is rejected rather than drawn. A flow that returns to a node it already passed through has no left-to-right layout, so the chart names the loop and asks you to remove one hop.
A flow that returns to a node it already passed through is a cycle. The returned-to node is split into a numbered copy so the diagram still lays out left-to-right — `A → B → A` draws as `A → B → A (2)`. Every copy of a node shares its color, and hovering one highlights the ribbons of all of them.

A node that flows directly to itself has no valid split, and the chart names the loop and asks you to remove one hop.

## Node grouping

Expand Down
33 changes: 20 additions & 13 deletions docs-mintlify/docs/explore-analyze/workbooks/calculated-fields.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ the same way.

You can also bucket an existing dimension without writing SQL. Open its menu in
the field picker sidebar and choose **Create bins…** on a number dimension, or
**Group values…** on a string one. Time dimensions have granularities instead,
and an already derived field cannot be bucketed again.
**Group values…** on a string or boolean one (grouping a boolean dimension is
how you rename its `true`/`false` values). Time dimensions have granularities
instead, and an already derived field cannot be bucketed again.

<Frame>
<img
Expand All @@ -98,18 +99,24 @@ and an already derived field cannot be bucketed again.
</Frame>

**Bins** take their boundaries either as a list (**Custom ranges**) or from a
**Start**, **Width**, and number of **Ranges** (**Equal width**). Each boundary
opens a bucket that includes its lower bound and excludes the upper one, and two
open-ended buckets are added at the edges—so `0, 18, 25` yields `< 0`, `[0, 18)`,
`[18, 25)`, `>= 25`, and no row is dropped. **Label style** renders a bucket as
`[10, 20)`, `>= 10 and < 20`, or `10 to 19`; the last is offered only while every
boundary is a whole number. Rows where the dimension is `NULL` are reported as
`Unknown`.
**Range start** and **Range end** (**Equal intervals**), which are prefilled
from the column's own minimum and maximum. For equal intervals, choose whether
the range is split by **Number of bins** or by a fixed **Bin size**. Each
boundary opens a bucket that includes its lower bound and excludes the upper
one, and two open-ended buckets are added at the edges—so `0, 18, 25` yields
`< 0`, `[0, 18)`, `[18, 25)`, `>= 25`, and no row is dropped. **Label style**
renders a bucket as `[10, 20)`, `>= 10 and < 20`, `10 to 19` (offered only while
every boundary is a whole number), or **Custom**, which lets you type your own
label for each bucket. Turn off **Label empty values separately** to fold rows
where the dimension is `NULL` into the last bucket instead of reporting them
under their own label (`Unknown` by default).

**Value groups** collect the dimension's values into named sets: pick values, name
the group, and choose **Add group**. A value belongs to one group at a time.
Whatever you did not pick—including empty values—falls under **Everything else**,
which defaults to `Other`.
the group, and choose **Add group**. A value belongs to one group at a time, and
an existing group's picked values can be changed later via **Edit group**. By
default, whatever you did not pick—including empty values—falls under
**Everything else**, which defaults to `Other`; turn off **Group remaining
values** to have those rows return `NULL` instead.

Bucket labels carry their position as a prefix (`1.`, `2.`, zero-padded past nine
buckets) so that sorting the column sorts it by value rather than alphabetically,
Expand All @@ -134,7 +141,7 @@ CASE WHEN orders_view.age IS NULL THEN 'Unknown'

<Info>

**Equal width** ranges are resolved into boundaries when the field is created, not
**Equal intervals** ranges are resolved into boundaries when the field is created, not
recomputed from the data. Values arriving later outside the range join the first
and last buckets instead of extending them.

Expand Down
18 changes: 13 additions & 5 deletions docs-mintlify/docs/integrations/google-sheets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,19 @@ by clicking **Save**.

## Work with saved reports

Go to the add-on menu and click **View saved reports** to see a list of
reports. Use the search box above the list to quickly find a folder or
exploration by name across your whole deployment, not just the current
folder — results are grouped by type and show each item's folder location,
and selecting one navigates you straight to it.
Opening the add-on shows the current spreadsheet's home: every exploration
placed in this spreadsheet, grouped by sheet, with each placement's range and
how long ago it last refreshed. A placement is tagged **Stale** when its
source exploration has been edited since that copy was written to the sheet.
Running an exploration keeps its progress even if you close the pane before
saving — the spreadsheet home lists it under **Unsaved**, and reopening it
resumes exactly where you left off. The pane can also hold more than one
exploration open at once, switchable from a picker at the top.

Click **Browse all explorations** to search by name across your whole
deployment, not just the current folder — results are grouped by type and
show each item's folder location, and selecting one navigates you straight to
it.

An exploration can be placed more than once — on different sheets or at
different anchors in the same spreadsheet, and in more than one document at
Expand Down
18 changes: 13 additions & 5 deletions docs-mintlify/docs/integrations/microsoft-excel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,19 @@ by clicking **Save**.

## Work with saved reports

Go to the add-in menu and click **View saved reports** to see a list of
reports. Use the search box above the list to quickly find a folder or
exploration by name across your whole deployment, not just the current
folder — results are grouped by type and show each item's folder location,
and selecting one navigates you straight to it.
Opening the add-in shows the current workbook's home: every exploration
placed in this workbook, grouped by sheet, with each placement's range and
how long ago it last refreshed. A placement is tagged **Stale** when its
source exploration has been edited since that copy was written to the sheet.
Running an exploration keeps its progress even if you close the pane before
saving — the workbook home lists it under **Unsaved**, and reopening it
resumes exactly where you left off. The pane can also hold more than one
exploration open at once, switchable from a picker at the top.

Click **Browse all explorations** to search by name across your whole
deployment, not just the current folder — results are grouped by type and
show each item's folder location, and selecting one navigates you straight to
it.

An exploration can be placed more than once — on different sheets or at
different anchors in the same workbook, and in more than one document at
Expand Down
14 changes: 14 additions & 0 deletions docs-mintlify/docs/integrations/power-bi/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,24 @@ You can connect a Cube deployment to Power BI using the [SQL API][ref-sql-api]
as if Cube is a Postgres database. It would provide much more limited functionality
than the DAX API. However, this is the only option when using Cube Core.

<Note>

When Power BI aggregates a measure of the [`count_distinct`][ref-count-distinct]
type, it generates SQL that counts `NULL` as one additional distinct value:
`COUNT(DISTINCT measure) + MAX(CASE WHEN measure IS NULL THEN 1 ELSE 0 END)`.
Cube does not support counting `NULL` as a distinct value, so it returns the
distinct count of non-`NULL` values only. Any group that contains a `NULL` comes
back one lower than Power BI asks for. Groups without `NULL` values are
unaffected, and a group is never ranked above one with a genuinely higher count,
so a sorted visual keeps its order except among groups that would otherwise tie.

</Note>


[link-powerbi]: https://www.microsoft.com/en-gb/power-platform/products/power-bi/
[link-powerbi-desktop-vs-service]: https://learn.microsoft.com/en-us/power-bi/fundamentals/service-service-vs-desktop
[link-powerbi-gateway]: https://learn.microsoft.com/en-us/power-bi/connect-data/service-gateway-onprem
[ref-count-distinct]: /reference/data-modeling/measures#type
[ref-dax-api]: /reference/core-data-apis/dax-api
[ref-integrations-apis]: /admin/connect-to-data/visualization-tools
[ref-sql-api]: /reference/core-data-apis/sql-api
Expand Down
10 changes: 10 additions & 0 deletions docs-mintlify/docs/preferences.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ account, apply across all devices, and don't affect other users in the account.
| Code editor | Switch to the new CodeMirror-based code editor for data models | Off |
| New message scrolling | Automatically scroll to new messages in chat | On |
| Alternating row colors | Highlight alternating rows in data tables | Off |
| Default deployment | Open this deployment when you go to Cube without one in the URL | Account default |

## Language

Expand Down Expand Up @@ -70,3 +71,12 @@ everyone queries in the account-wide zone.

See [Time zones](/admin/time-zones) for what a zone changes and how dashboards carry their
own.

## Default deployment

On an account with more than one deployment, **Default deployment** on the **Preferences**
page picks which one you land on when you open Cube without a deployment specified in the
URL. Leaving it as **Account default** falls back, in order, to the deployment you last
switched to, then the account-wide default an admin can set from the
[deployments list](/admin/deployment#list-of-deployments), then your most recently created
deployment. The control is hidden on accounts with only one reachable deployment.
4 changes: 4 additions & 0 deletions docs-mintlify/embedding/iframe/creator-mode.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ Embed users in Creator Mode can share the workbooks and dashboards they build wi
Sharing is scoped to the [embed tenant](#embed-tenant-scoping): users can only share with others in the same tenant, never across tenants.
</Note>

## Folders and workbook actions

Embed users in Creator Mode can create, rename, and delete folders in their own workspace — gated by the same permissions as the full Cube app, and disabled inside a folder shared in from the main workspace. Opening a workbook's actions menu from its header (click the workbook name, or its chevron) offers **Rename**, **Duplicate**, and **Delete**, permission-gated the same way as the full app, plus **View all** and **New workbook** for navigating between workbooks.

## Example

```javascript
Expand Down
12 changes: 6 additions & 6 deletions packages/cubejs-backend-native/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/cubejs-backend-shared/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ export * from './disposedProxy';
export * from './logger';
export * from './pool';
export * from './sql-escape';
export * from './request-id';
Loading
Loading