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
5 changes: 4 additions & 1 deletion docs/pages/product/workspace.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ In Cube Cloud, you can:
- Use the [data model editor][ref-data-model] with the [development
mode][ref-dev-mode] and [Rollup Designer][ref-rollup-designer] to build
the data model of your semantic layer.
- Use [Visual Modeler][ref-visual-modeler] to build and edit your data model
using a canvas-based UI.
- Access the data model through different [Environments][ref-environments].
- Use [Playground][ref-playground] to run queries and test the data model.
- Use [Chart Prototyping][ref-vizard] to generate code of a front-end
Expand Down Expand Up @@ -77,4 +79,5 @@ With Cube Core, you can:
[ref-ai-assistant]: /product/workspace/ai-assistant
[ref-semantic-catalog]: /product/workspace/semantic-catalog
[ref-encryption-keys]: /product/workspace/encryption-keys
[ref-cube-store-encryption]: /product/caching/running-in-production#data-at-rest-encryption
[ref-cube-store-encryption]: /product/caching/running-in-production#data-at-rest-encryption
[ref-visual-modeler]: /product/workspace/visual-modeler
1 change: 1 addition & 0 deletions docs/pages/product/workspace/_meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module.exports = {
"playground": "Playground",
"vizard": "Chart Prototyping",
"data-model": "Data Model",
"visual-modeler": "Visual Modeler",
"rollup-designer": "Rollup Designer",
"dev-mode": "Development mode",
"environments": "Environments",
Expand Down
7 changes: 7 additions & 0 deletions docs/pages/product/workspace/data-model.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ there are any unsaved changes:

## Data Graph

<InfoBox>
For Cube Cloud customers on the [Enterprise](https://cube.dev/pricing) tier,
the Data Graph is replaced by [Visual Modeler][ref-visual-modeler].
Please see the [Visual Modeler page][ref-visual-modeler] for more details.
</InfoBox>

In addition to exploring the code of data model files, you can view the visual
representation of the data model, including relations between cubes.
Click <Btn>Show Graph</Btn> in the top right part of the data model editor to
Expand Down Expand Up @@ -162,3 +168,4 @@ If you'd like to use the UI to create a pre-aggregation, you can click on the
[wiki-erd]: https://en.wikipedia.org/wiki/Entity–relationship_model
[ref-rollup-designer]: /product/workspace/rollup-designer
[ref-creating-deployment]: /product/deployment/cloud/deployments#creating-a-new-deployment
[ref-visual-modeler]: /product/workspace/visual-modeler
191 changes: 191 additions & 0 deletions docs/pages/product/workspace/visual-modeler.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
# Visual Modeler

With Cube Visual Modeler, non-technical users can actively participate in data
modeling without writing a single line of code, and code-proficient engineers
have the option of working in code or no-code.

<SuccessBox>

Visual Modeler is available in Cube Cloud on
[Enterprise](https://cube.dev/pricing) tier.
[Contact us](https://cube.dev/contact) for details.

</SuccessBox>

<WarningBox>
Cube Visual Modeler is currently in preview.
</WarningBox>

<Screenshot
src="https://ucarecdn.com/2517fe8b-b492-4e75-a9ea-e4c2999dff93/"
alt="Visual modeler screenshot"
/>

## Getting started
Contact your Cube account team to enable Cube Visual Modeler.

<InfoBox>
Cube Visual Modeler replaces the [Data Graph][ref-data-graph] for accounts
where it is enabled. All functionality of the Data Graph is still present in
Visual Modeler plus new features to allow visual editing of your Cube data
model.
</InfoBox>

For existing developers who are comfortable writing code, there is nothing
additional needed to set up Visual Modeler. They can simply use it alongside
their existing code-first workflow.

If you would like business users to have self-serve access to Visual Modeler,
we recommend the following setup:
1. In your Cube deployment's settings, under the <Btn>Build & Deploy</Btn> tab, connect
it to a Git repository.
2. Disable direct commits to the main branch and disable merging to the main branch.

See the [Continuous deployment][ref-continuous-deployment] page for more information.

This way, business users can submit pull requests for an admin to review via
Cube's git integration but do not have the ability to merge their own changes.
This allows you to govern your Cube data model while letting users who are less
comfortable with code make contributions via Visual Modeler.

## Using Visual Modeler

Cube Visual Modeler lets you see and edit your Cube data model in an easy-to-use,
graphical interface. You can also switch seamlessly between Visual Modeler and
the original code-based [Data Model editor][ref-data-model] depending on your needs.

<Screenshot
src="https://ucarecdn.com/08acf61b-faa3-4edb-9673-1d3de44b8a05/"
alt="Visual modeler canvas UI"
/>

To open Visual Modeler, click on the <Btn>Show Canvas</Btn> button in the top
right of the [Data Model][ref-data-model] page. Visual Modeler will stay open
until you go back to the code editor by clicking the <Btn>View Code</Btn>
button or <Btn>Show Code</Btn> on any cube or view node.

## Cubes

### Adding cubes

To add a cube, click the <Btn>Add Cube</Btn> button in the top left of the Visual Modeler
screen. This brings up the Add Cube dialog where you can select a table from your
database, choose dimensions and primary keys, and review your choices before
submitting.

<InfoBox>
Note that you cannot add measures at this step. To do so, first add your cube,
then follow the instructions in [Editing cubes](#editing-cubes) or [Adding
dimensions and measures](#adding-dimensions-and-measures) below.
</InfoBox>

<Screenshot
src="https://ucarecdn.com/5738b483-91f2-436c-9768-ba7858a6f1c1/"
alt="Add cube dialog"
/>

### Editing cubes

To edit a cube, first select the cube on the canvas by clicking on it. Then, in
the sidebar, click <Btn>Edit</Btn> in the top right. This brings up a modal where you can
edit the cube's details (name, title, SQL, etc.), dimensions, measures, and
relationships.

You may use this dialog to add dimensions, measures, and joins, or do so via the
[Adding dimensions and measures](#adding-dimensions-and-measures) and [Working
with joins](#working-with-joins) sections below.

<Screenshot
src="https://ucarecdn.com/09c12fc2-b4d3-4e96-a05c-002f7f0dcc5e/"
alt="Edit cube dialog"
/>

### Adding dimensions and measures

To add a dimension or measure, first select a cube on the canvas by clicking on
it. Them, in the sidebar, click <Btn>Add Dimension</Btn> or <Btn>Add Measure.</Btn>

<Screenshot
src="https://ucarecdn.com/9a009f04-18bd-4573-ac8a-d50641bcbf55/"
alt="Add measure dialog"
/>

### Working with joins

You can add or edit joins via the "Relationships" section of the Edit Cube dialog
(see "[Editing cubes](#editing-cubes)" above).

Visual Modeler also lets you add joins visually by dragging a line on the canvas
from the side of one dimension to another.

<YouTubeVideo
url="https://drive.google.com/file/d/1t5RPLLv9CsKvpqeRm0Dh3pnfmpADP1hq/preview"
alt="Adding a join"
/>

## Views

### Adding views
To add a view, click the <Btn>Views</Btn> tab at the top of the canvas. Then, click <Btn>Add
View</Btn>. This brings up a dialog where you can choose the base cube, set the view
details such as name and title, and add joins and join paths.

<Screenshot
src="https://ucarecdn.com/ce5e9014-2ce6-4aa8-a811-469617708684/"
alt="Adding a view"
/>

### Editing views

The same dialog may be used to edit existing views by selecting the view in the
dropdown, clicking on it in the canvas, and clicking <Btn>Edit</Btn> in the sidebar.

## YAML mode

All the dialogs mentioned above have a "YAML mode" where you can see and edit
the Cube YAML generated by Visual Modeler. This lets you add properties that
are not natively supported by the Visual Modeler GUI (for example [meta
tags][ref-meta]) or inspect the YAML you've generated before submitting it.

To access YAML mode, click the <Btn>Create with YAML</Btn> or <Btn>Edit with YAML</Btn> button
at the bottom of the dialog.

<Screenshot
src="https://ucarecdn.com/d8c15304-571d-4a3a-a58d-1574ab4d1712/"
alt="YAML mode"
/>

## Limitations

Cube Visual Modeler does not natively support some features of the Cube data
model when adding or editing cubes and views. However, these may be added via
[YAML mode](#yaml-mode) or in the [data model code editor][ref-data-model].

For example, the following are not included in Visual Modeler:
- [Meta tags][ref-meta]
- [Segments][ref-segments]
- [Refresh keys][ref-refresh-keys], [pre-aggregations][ref-pre-aggregations], [subqueries][ref-sub-query], or [granularities][ref-granularities] on dimensions
- [Drill members][ref-drill-members] or [rolling windows][ref-rolling-window] on measures

Cubes and views using those features will still be displayed in
Visual Modeler, but those fields can only be edited via [YAML mode](#yaml-mode)
or in the code editor.

Additionally, Visual Modeler only allows editing of cubes and views that are
defined in YAML, not JavaScript, and it does not allow editing of [dynamic data
models][ref-dynamic-data-models] or models which use [Jinja][ref-jinja], although
they will still be displayed on the canvas.

[ref-data-graph]: /product/workspace/data-model#data-graph
[ref-data-model]: /product/workspace/data-model
[ref-meta]: /reference/data-model/cube#meta
[ref-segments]: /reference/data-model/segments
[ref-refresh-keys]: /reference/data-model/cube#refresh_key
[ref-pre-aggregations]: /reference/data-model/pre-aggregations
[ref-sub-query]: /reference/data-model/dimensions#sub_query
[ref-granularities]: /reference/data-model/dimensions#granularities
[ref-drill-members]: /reference/data-model/measures#drill_members
[ref-rolling-window]: /reference/data-model/measures#rolling_window
[ref-dynamic-data-models]: /product/data-modeling/dynamic
[ref-jinja]: /product/data-modeling/dynamic/jinja
[ref-continuous-deployment]: /product/deployment/cloud/continuous-deployment