-
Notifications
You must be signed in to change notification settings - Fork 2.1k
docs: document embed user pre-provisioning and the split AI billing tabs #11711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,25 @@ the **Cube Cloud** logo in the top left corner. | |
| <img src="https://ucarecdn.com/cdd5831a-a8f8-4342-bc3e-25aab2c04a5b/" /> | ||
| </Frame> | ||
|
|
||
| ### Default deployment | ||
|
|
||
| If an account has more than one deployment, you can control which one people land | ||
| on when they open the workspace without navigating to a specific deployment | ||
| directly: | ||
|
|
||
| - **Account-wide** — an admin opens the **⋯** menu on a row in the deployments | ||
| list and chooses **Set as default** (or **Remove as default**). The pinned | ||
| deployment is marked with a home icon and becomes the landing deployment for | ||
| anyone who hasn't chosen one of their own. | ||
| - **Per user** — anyone can pin their own default from their account | ||
| **Preferences**, which takes precedence over the account-wide pin. The | ||
| deployment you most recently switched to also counts as a personal choice and | ||
| outranks the account pin, so it only applies until you actively switch to | ||
| something else. | ||
|
|
||
| Draft deployments are never candidates for either pin, and a pin you no longer | ||
|
Comment on lines
+28
to
+37
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The precedence story is hard to follow as written:
An explicit ranked list would carry this better than prose, e.g.:
|
||
| have access to is skipped in favor of the next one in this order. | ||
|
|
||
| ## Creating a new deployment | ||
|
|
||
| Creating a new deployment is an essential prerequisite to running a Cube | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -147,5 +147,10 @@ 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. | ||
| Select a calculated field in the sidebar to open its editor. A field created by | ||
| the **bins** or **groups** panel reopens that same structured editor, letting you | ||
| change its **name** and **SQL expression**. Any other calculated field — a `CASE` | ||
| expression, a calculation like **% of total**, or a field saved to the workbook — | ||
|
Comment on lines
+150
to
+153
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Two problems in the structured-editor half of this sentence:
|
||
| opens a SQL-only editor showing just its expression, since the field has no | ||
| structured form to round-trip. Edit the SQL and choose **Update** to apply; this | ||
| editor doesn't offer renaming. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -612,6 +612,16 @@ credential can write to the repository — a `git-receive-pack` probe for a PAT, | |
| | --- | --- | | ||
| | **Models path** | Directory in the dbt project where generated model files are written. Defaults to `models/marts/cube/`. | | ||
| | **Delivery mode** | **Open a pull request** (default) pushes to a `cube/dbt-push/*` branch and opens a PR/MR. **Commit directly to a branch** commits straight to a branch you name — validation still runs. | | ||
| | **Validation level** | How thoroughly a model is checked before it's committed: **Parse** only confirms the project still parses; **Compile** also compiles the generated SQL; **Build** additionally runs the model (and its tests) against your warehouse, in the **validation schema** below, so a broken model is caught before the PR opens. | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding configurable validation levels leaves two earlier statements on this page describing only the Parse case as if it were the whole story:
A reader who sets Build and then reads the Push step is told their model is only parsed. Both should generalize to "the configured validation level" and point back to this row — otherwise the page contradicts itself on what actually gains the PR its green status. |
||
| | **Validation schema** | Schema in your warehouse Cube builds into when validation level is **Build**. You own this schema — Cube never creates or drops it, and only the temporary relation created for that one validation run is cleaned up afterward. Required when validation level is **Build**. | | ||
|
|
||
| <Note> | ||
|
|
||
| **Build** currently runs on Snowflake, Amazon Redshift, PostgreSQL, and ClickHouse. On | ||
| Google BigQuery, Databricks, and Amazon Athena it falls back to **Parse** until | ||
| connection support for those warehouses is added. | ||
|
|
||
| </Note> | ||
|
|
||
| Then **Save dbt settings**. | ||
|
|
||
|
|
@@ -659,6 +669,17 @@ hosts, a prefilled compare link to open it yourself. | |
|
|
||
| </Steps> | ||
|
|
||
| ### Author models from Analytics Chat | ||
|
|
||
| You can also drive the whole push loop from [the agent](/docs/explore-analyze/analytics-chat) | ||
| instead of the dialog above — for example, "turn this into a dbt model and open a PR." The | ||
| agent opens a live sandbox on your dbt project, drafts the model's `.sql` and `.yml`, and | ||
| runs the same validation configured above (parse, compile, or a full build against your | ||
| validation schema). It reports what it found and asks you to confirm before committing or | ||
| opening the pull request, using the delivery mode configured on the integration. Because the | ||
| sandbox stays open across the conversation, you can ask it to adjust the draft and | ||
| re-validate before you confirm. | ||
|
|
||
| ### What gets pushed | ||
|
|
||
| Each push creates exactly two new files: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,15 @@ same as in a standalone dashboard embed. To hide any of its controls (title, | |
| back button, Edit, Duplicate) for your embed, see | ||
| [Show or hide header controls](/embedding/iframe/dashboards#show-or-hide-header-controls). | ||
|
|
||
| ## Workbook header controls | ||
|
|
||
| When a user opens a workbook (rather than a published dashboard) inside Creator | ||
| Mode, its header offers the same actions menu as the console: **Rename**, | ||
| **Duplicate**, **View all**, **New workbook**, and **Delete**. Rename and Delete | ||
| require the embed user's **Manage** permission on the workbook; Duplicate | ||
| requires **Manage** or **Edit**. Double-clicking the workbook name also renames | ||
|
Comment on lines
+29
to
+31
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Manage and Edit are introduced here as named workbook permissions, but nothing else in Also, the Dashboard header controls section directly above ends with a pointer to Show or hide header controls. This new section is silent on whether the workbook actions menu can be hidden the same way — a reader will reasonably assume it can. Worth saying either way. |
||
| it, the same as in the full Cube app. | ||
|
|
||
| ## Embed tenant scoping | ||
|
|
||
| In Creator Mode, content (workbooks, dashboards) and the groups/user attributes referenced by the session are scoped to an **embed tenant**. Pass `embedTenantName` to isolate content per customer; omit it to use the current tenant. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -268,6 +268,21 @@ const session = await fetch( | |
|
|
||
| A second call with the same body produces the same end state: the group and attribute already exist, descriptions/display names are reconciled if they changed, and the user's memberships and values are re-applied. | ||
|
|
||
| ## Provisioning users ahead of their first session | ||
|
|
||
| An embed user is normally created only when they generate their first session — so you cannot add them to a group or share a workbook or dashboard with them until they have opened the embed at least once. To make a user addressable immediately, provision them directly: | ||
|
|
||
| ```text | ||
| POST /api/v1/embed-tenants/{embedTenantName}/user | ||
| POST /api/v1/embed-tenants/{embedTenantName}/users | ||
| ``` | ||
|
|
||
| The singular endpoint provisions one user; the plural endpoint provisions up to 100 in a single request and is partially successful — it returns `succeeded` and `failed` arrays instead of failing the whole batch for one bad entry, with each failure keyed by `externalId`. | ||
|
|
||
| Each user takes the same fields as `generate-session` above — `externalId`, `email`, `userProfile`, `groups`, `tenantGroups` — except `userAttributes` and `securityContext`, which every session re-applies and so are not accepted here. Provisioning is idempotent: an existing `externalId` is updated rather than rejected, `email` and `userProfile` are overwritten only when supplied, and each group field is replaced when supplied, left untouched when omitted, and cleared with `[]`. Omit `email` and Cube derives a placeholder address instead, which makes the user harder to recognize in a list. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It does exist in the API ( | Same page also omits |
||
|
|
||
| These endpoints use the same `Api-Key` authentication as Generate Session and require admin access. | ||
|
Comment on lines
+271
to
+284
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both endpoints are already documented in the generated API reference — Worth adding a link to the reference (e.g. Two details the prose drops that are load-bearing:
|
||
|
|
||
| ## Embed-tenant admin API | ||
|
|
||
| To list or delete the groups and attributes that have been bootstrapped into an embed tenant, use the admin endpoints scoped to that tenant: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"spend" is ambiguous on this page — it's used a few lines up (line 55) for actual money, in "monthly on-demand spending limit". Here it means token consumption, which is what the sentence above it says ("monitor token consumption"). Suggest keeping the vocabulary consistent: