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
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,25 @@ 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`.
**Bins** take their boundaries either as a typed list (**Boundaries**) or generated
over a range (**Equal intervals**, from a **Range start** and **Range end**, driven
by either a **Number of bins** or a fixed **Bin size**—up to 100 generated bins).
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—or lets you type a **Custom** label per bucket.

By default, rows where the dimension is `NULL` fall into the last bucket. Turn on

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 new default contradicts the generated-SQL example further down. Line 135 still shows the Unknown branch as unconditional:

CASE WHEN orders_view.age IS NULL THEN 'Unknown'

but per this paragraph that branch only exists when Label empty values separately is on — the default now folds NULL into the last bucket (the ELSE arm). Either drop that first WHEN from the example, or add a half-sentence above the block noting the preview is shown with Label empty values separately enabled.

Same for the <Frame> alt text above ("a preview of the five buckets") — worth confirming the screenshot still matches the renamed Boundaries / Equal intervals tabs, since the panel UI changed.

**Label empty values separately** to give them their own bucket, labeled `Unknown`
by default (also editable).

**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**; the pencil icon on an existing group lets you
edit its picked values and name. A value belongs to one group at a time. By
default, whatever you did not pick—including empty values—falls under **Everything
else**, which defaults to `Other`; turn off **Group remaining values** to return
`NULL` for them 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 +140,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** 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 All @@ -147,5 +153,9 @@ not.

### Editing a calculated field

Select a calculated field in the sidebar to open the editor. You can change its
**name** and **SQL expression**, then choose **Update** to apply.
Open a calculated field's menu—in the **Query fields** sidebar list, or from its

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.

This section and the paragraph at line 149 now describe the same action with different menu labels: line 149 says "choose Edit bins… or Edit groups… from its menu—either in the sidebar or on its column header", while this says the row menu offers Edit and a bins/groups field "reopens that panel". If the menu item is now uniformly Edit (as the PR description says), line 149 is stale and should either be updated or collapsed into this section — right now a reader looking for "Edit bins…" won't find it in the UI.

column header in the results—and choose **Edit**. A field created by the bins or
value groups panel reopens that panel; every other calculated field opens a SQL
editor showing its expression. Either way, only the expression can be changed—
naming happens when the field is created, not afterward. Choose **Update** (or
**Save**, for a bins/groups field) to apply.
14 changes: 14 additions & 0 deletions docs-mintlify/docs/integrations/dbt.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,20 @@ hosts, a prefilled compare link to open it yourself.

</Steps>

### Push a cube from Analytics Chat

Ask [the agent](/docs/explore-analyze/analytics-chat) to promote a cube to dbt, or to

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.

Content is accurate and the #enable-push / analytics-chat links resolve. Two style points:

  • Em dashes. This page uses spaced throughout (83 occurrences, including the sibling section at line 438); this new section uses unspaced five times ("yourself—for example", "conventions, then", "sandbox—iterating", "valid—before"). Worth normalizing to the page's style.
  • Discoverability. The intro at line 21 enumerates how pulls can be triggered and links #trigger-from-analytics-chat, and the <Info> at line 27 points to #push-cubes-to-dbt. Neither mentions that push can now be driven from chat too. A clause in the push <Info> (or in the Push a cube intro) linking here would surface it for readers who don't scroll the whole page.

edit an existing dbt model, instead of opening the push dialog yourself—for example,
"push the orders cube to dbt" or "add a total_amount column to the stg_orders dbt
model." The agent opens a live sandboxed clone of your dbt repository, reads
`dbt_project.yml` and neighboring models to match your project's conventions, then
drafts and writes the model's `.sql` and `.yml` files and runs `dbt parse`/`dbt
compile` in the sandbox—iterating until the change is valid—before handing it back to
you to actually deliver via the push flow above.

This requires [push](#enable-push) to be enabled on the deployment; it inherits dbt
push's preview status.

### What gets pushed

Each push creates exactly two new files:
Expand Down
22 changes: 15 additions & 7 deletions docs-mintlify/embedding/iframe/dashboards.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,28 @@ This works on both regular and published (embedded) dashboards. The filter is
only applied if a matching filter widget for that dimension already exists on the
dashboard.

## Allow CSV export
## Allow widget export {#allow-csv-export}

By default, embedded dashboards do not expose a download action on individual
widgets. To let viewers download a chart widget's data as a CSV file, add the
`allowExport=true` query parameter to the embed URL:
widgets. To let viewers download a chart widget, add the `allowExport=true`
query parameter to the embed URL:

```text
https://your-tenant.cubecloud.dev/embed/dashboard/YOUR_DASHBOARD_PUBLIC_ID?session=YOUR_SESSION_ID&allowExport=true
```

When enabled, each chart widget's ⋮ menu shows a **Download as CSV** action. The
CSV is generated client-side from the data already loaded into the widget, so no
additional query is issued. The parameter is opt-in — omit it (the default) to
keep the download action hidden.
When enabled, each chart widget's ⋮ menu shows **Download as CSV**, **Download
as PNG**, and **Download as PDF**. The CSV is generated client-side from the
data already loaded into the widget; PNG and PDF are rendered server-side, so
they work even before the widget has finished loading in the browser. The
parameter is opt-in — omit it (the default) to keep the download actions
hidden. A tenant's **Restrict data downloads** admin lock, if enabled,

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 setting name doesn't match what's documented elsewhere. admin/users-and-permissions/roles-and-permissions.mdx#restricting-data-downloads calls it the Allow data downloads switch on Admin → Settings (turning it off hides export controls everywhere, "including admins and embeds") — there's no "Restrict data downloads" lock anywhere else in the docs. Suggest matching that name and linking, so the two pages stay in sync:

Suggested change
hidden. A tenant's **Restrict data downloads** admin lock, if enabled,
hidden. Turning off the account-wide **Allow data downloads** switch
([data download controls](/admin/users-and-permissions/roles-and-permissions#restricting-data-downloads))
overrides `allowExport` and hides all three actions regardless of the URL
parameter.

Two smaller things in this section:

  • /docs/explore-analyze/dashboards#download-a-dashboard-as-png-or-pdf already covers the server-rendered PNG/PDF behavior and warns it "can take up to a couple of minutes for large dashboards" — worth a cross-link here, since embedded viewers hit the same latency.
  • "so they work even before the widget has finished loading in the browser" reads as an inference from server-side; the tradeoff a reader actually needs is that it's slower and re-renders with your current filter/time-grain selections.

overrides `allowExport` and hides all three actions regardless of the URL
parameter.

Only one export can run at a time per dashboard. Starting a second export
while one is still in progress shows **"Another export is still running. Wait
for it to finish and try again."**

## Show or hide the AI chat

Expand Down
14 changes: 7 additions & 7 deletions docs-mintlify/embedding/iframe/events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ painted" signal (distinct from `ready`, which fires at mount, before data loads)

#### `cube:event:download` {#cube-event-download}

Emitted when a viewer exports something — a widget's data as CSV, or (in future)
a dashboard image. Reports _that_ an export happened and its shape — never the
exported rows themselves.
Emitted when a viewer exports something — a widget's data as CSV, or a chart
widget as a PNG or PDF image. Reports _that_ an export happened and its shape
— never the exported rows themselves.

| Field | Type | Description |
| --- | --- | --- |
Expand All @@ -209,10 +209,10 @@ exported rows themselves.
```

<Note>
The CSV download action on a dashboard widget only appears when the embed URL
includes `allowExport=true` (see [Dashboards → Allow CSV
export](/embedding/iframe/dashboards#allow-csv-export)). The event fires when a
viewer uses it.
The CSV, PNG, and PDF download actions on a dashboard widget only appear
when the embed URL includes `allowExport=true` (see [Dashboards → Allow
widget export](/embedding/iframe/dashboards#allow-csv-export)). The event
fires when a viewer uses one of them.
</Note>

#### `cube:event:drilldown` {#cube-event-drilldown}
Expand Down
Loading