Skip to content

Commit 3553bdb

Browse files
authored
docs: adds visual modeler page (#8860)
1 parent a52eeed commit 3553bdb

File tree

4 files changed

+203
-1
lines changed

4 files changed

+203
-1
lines changed

docs/pages/product/workspace.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ In Cube Cloud, you can:
1717
- Use the [data model editor][ref-data-model] with the [development
1818
mode][ref-dev-mode] and [Rollup Designer][ref-rollup-designer] to build
1919
the data model of your semantic layer.
20+
- Use [Visual Modeler][ref-visual-modeler] to build and edit your data model
21+
using a canvas-based UI.
2022
- Access the data model through different [Environments][ref-environments].
2123
- Use [Playground][ref-playground] to run queries and test the data model.
2224
- Use [Chart Prototyping][ref-vizard] to generate code of a front-end
@@ -77,4 +79,5 @@ With Cube Core, you can:
7779
[ref-ai-assistant]: /product/workspace/ai-assistant
7880
[ref-semantic-catalog]: /product/workspace/semantic-catalog
7981
[ref-encryption-keys]: /product/workspace/encryption-keys
80-
[ref-cube-store-encryption]: /product/caching/running-in-production#data-at-rest-encryption
82+
[ref-cube-store-encryption]: /product/caching/running-in-production#data-at-rest-encryption
83+
[ref-visual-modeler]: /product/workspace/visual-modeler

docs/pages/product/workspace/_meta.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ module.exports = {
22
"playground": "Playground",
33
"vizard": "Chart Prototyping",
44
"data-model": "Data Model",
5+
"visual-modeler": "Visual Modeler",
56
"rollup-designer": "Rollup Designer",
67
"dev-mode": "Development mode",
78
"environments": "Environments",

docs/pages/product/workspace/data-model.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ there are any unsaved changes:
6363

6464
## Data Graph
6565

66+
<InfoBox>
67+
For Cube Cloud customers on the [Enterprise](https://cube.dev/pricing) tier,
68+
the Data Graph is replaced by [Visual Modeler][ref-visual-modeler].
69+
Please see the [Visual Modeler page][ref-visual-modeler] for more details.
70+
</InfoBox>
71+
6672
In addition to exploring the code of data model files, you can view the visual
6773
representation of the data model, including relations between cubes.
6874
Click <Btn>Show Graph</Btn> in the top right part of the data model editor to
@@ -162,3 +168,4 @@ If you'd like to use the UI to create a pre-aggregation, you can click on the
162168
[wiki-erd]: https://en.wikipedia.org/wiki/Entity–relationship_model
163169
[ref-rollup-designer]: /product/workspace/rollup-designer
164170
[ref-creating-deployment]: /product/deployment/cloud/deployments#creating-a-new-deployment
171+
[ref-visual-modeler]: /product/workspace/visual-modeler
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
# Visual Modeler
2+
3+
With Cube Visual Modeler, non-technical users can actively participate in data
4+
modeling without writing a single line of code, and code-proficient engineers
5+
have the option of working in code or no-code.
6+
7+
<SuccessBox>
8+
9+
Visual Modeler is available in Cube Cloud on
10+
[Enterprise](https://cube.dev/pricing) tier.
11+
[Contact us](https://cube.dev/contact) for details.
12+
13+
</SuccessBox>
14+
15+
<WarningBox>
16+
Cube Visual Modeler is currently in preview.
17+
</WarningBox>
18+
19+
<Screenshot
20+
src="https://ucarecdn.com/2517fe8b-b492-4e75-a9ea-e4c2999dff93/"
21+
alt="Visual modeler screenshot"
22+
/>
23+
24+
## Getting started
25+
Contact your Cube account team to enable Cube Visual Modeler.
26+
27+
<InfoBox>
28+
Cube Visual Modeler replaces the [Data Graph][ref-data-graph] for accounts
29+
where it is enabled. All functionality of the Data Graph is still present in
30+
Visual Modeler plus new features to allow visual editing of your Cube data
31+
model.
32+
</InfoBox>
33+
34+
For existing developers who are comfortable writing code, there is nothing
35+
additional needed to set up Visual Modeler. They can simply use it alongside
36+
their existing code-first workflow.
37+
38+
If you would like business users to have self-serve access to Visual Modeler,
39+
we recommend the following setup:
40+
1. In your Cube deployment's settings, under the <Btn>Build & Deploy</Btn> tab, connect
41+
it to a Git repository.
42+
2. Disable direct commits to the main branch and disable merging to the main branch.
43+
44+
See the [Continuous deployment][ref-continuous-deployment] page for more information.
45+
46+
This way, business users can submit pull requests for an admin to review via
47+
Cube's git integration but do not have the ability to merge their own changes.
48+
This allows you to govern your Cube data model while letting users who are less
49+
comfortable with code make contributions via Visual Modeler.
50+
51+
## Using Visual Modeler
52+
53+
Cube Visual Modeler lets you see and edit your Cube data model in an easy-to-use,
54+
graphical interface. You can also switch seamlessly between Visual Modeler and
55+
the original code-based [Data Model editor][ref-data-model] depending on your needs.
56+
57+
<Screenshot
58+
src="https://ucarecdn.com/08acf61b-faa3-4edb-9673-1d3de44b8a05/"
59+
alt="Visual modeler canvas UI"
60+
/>
61+
62+
To open Visual Modeler, click on the <Btn>Show Canvas</Btn> button in the top
63+
right of the [Data Model][ref-data-model] page. Visual Modeler will stay open
64+
until you go back to the code editor by clicking the <Btn>View Code</Btn>
65+
button or <Btn>Show Code</Btn> on any cube or view node.
66+
67+
## Cubes
68+
69+
### Adding cubes
70+
71+
To add a cube, click the <Btn>Add Cube</Btn> button in the top left of the Visual Modeler
72+
screen. This brings up the Add Cube dialog where you can select a table from your
73+
database, choose dimensions and primary keys, and review your choices before
74+
submitting.
75+
76+
<InfoBox>
77+
Note that you cannot add measures at this step. To do so, first add your cube,
78+
then follow the instructions in [Editing cubes](#editing-cubes) or [Adding
79+
dimensions and measures](#adding-dimensions-and-measures) below.
80+
</InfoBox>
81+
82+
<Screenshot
83+
src="https://ucarecdn.com/5738b483-91f2-436c-9768-ba7858a6f1c1/"
84+
alt="Add cube dialog"
85+
/>
86+
87+
### Editing cubes
88+
89+
To edit a cube, first select the cube on the canvas by clicking on it. Then, in
90+
the sidebar, click <Btn>Edit</Btn> in the top right. This brings up a modal where you can
91+
edit the cube's details (name, title, SQL, etc.), dimensions, measures, and
92+
relationships.
93+
94+
You may use this dialog to add dimensions, measures, and joins, or do so via the
95+
[Adding dimensions and measures](#adding-dimensions-and-measures) and [Working
96+
with joins](#working-with-joins) sections below.
97+
98+
<Screenshot
99+
src="https://ucarecdn.com/09c12fc2-b4d3-4e96-a05c-002f7f0dcc5e/"
100+
alt="Edit cube dialog"
101+
/>
102+
103+
### Adding dimensions and measures
104+
105+
To add a dimension or measure, first select a cube on the canvas by clicking on
106+
it. Them, in the sidebar, click <Btn>Add Dimension</Btn> or <Btn>Add Measure.</Btn>
107+
108+
<Screenshot
109+
src="https://ucarecdn.com/9a009f04-18bd-4573-ac8a-d50641bcbf55/"
110+
alt="Add measure dialog"
111+
/>
112+
113+
### Working with joins
114+
115+
You can add or edit joins via the "Relationships" section of the Edit Cube dialog
116+
(see "[Editing cubes](#editing-cubes)" above).
117+
118+
Visual Modeler also lets you add joins visually by dragging a line on the canvas
119+
from the side of one dimension to another.
120+
121+
<YouTubeVideo
122+
url="https://drive.google.com/file/d/1t5RPLLv9CsKvpqeRm0Dh3pnfmpADP1hq/preview"
123+
alt="Adding a join"
124+
/>
125+
126+
## Views
127+
128+
### Adding views
129+
To add a view, click the <Btn>Views</Btn> tab at the top of the canvas. Then, click <Btn>Add
130+
View</Btn>. This brings up a dialog where you can choose the base cube, set the view
131+
details such as name and title, and add joins and join paths.
132+
133+
<Screenshot
134+
src="https://ucarecdn.com/ce5e9014-2ce6-4aa8-a811-469617708684/"
135+
alt="Adding a view"
136+
/>
137+
138+
### Editing views
139+
140+
The same dialog may be used to edit existing views by selecting the view in the
141+
dropdown, clicking on it in the canvas, and clicking <Btn>Edit</Btn> in the sidebar.
142+
143+
## YAML mode
144+
145+
All the dialogs mentioned above have a "YAML mode" where you can see and edit
146+
the Cube YAML generated by Visual Modeler. This lets you add properties that
147+
are not natively supported by the Visual Modeler GUI (for example [meta
148+
tags][ref-meta]) or inspect the YAML you've generated before submitting it.
149+
150+
To access YAML mode, click the <Btn>Create with YAML</Btn> or <Btn>Edit with YAML</Btn> button
151+
at the bottom of the dialog.
152+
153+
<Screenshot
154+
src="https://ucarecdn.com/d8c15304-571d-4a3a-a58d-1574ab4d1712/"
155+
alt="YAML mode"
156+
/>
157+
158+
## Limitations
159+
160+
Cube Visual Modeler does not natively support some features of the Cube data
161+
model when adding or editing cubes and views. However, these may be added via
162+
[YAML mode](#yaml-mode) or in the [data model code editor][ref-data-model].
163+
164+
For example, the following are not included in Visual Modeler:
165+
- [Meta tags][ref-meta]
166+
- [Segments][ref-segments]
167+
- [Refresh keys][ref-refresh-keys], [pre-aggregations][ref-pre-aggregations], [subqueries][ref-sub-query], or [granularities][ref-granularities] on dimensions
168+
- [Drill members][ref-drill-members] or [rolling windows][ref-rolling-window] on measures
169+
170+
Cubes and views using those features will still be displayed in
171+
Visual Modeler, but those fields can only be edited via [YAML mode](#yaml-mode)
172+
or in the code editor.
173+
174+
Additionally, Visual Modeler only allows editing of cubes and views that are
175+
defined in YAML, not JavaScript, and it does not allow editing of [dynamic data
176+
models][ref-dynamic-data-models] or models which use [Jinja][ref-jinja], although
177+
they will still be displayed on the canvas.
178+
179+
[ref-data-graph]: /product/workspace/data-model#data-graph
180+
[ref-data-model]: /product/workspace/data-model
181+
[ref-meta]: /reference/data-model/cube#meta
182+
[ref-segments]: /reference/data-model/segments
183+
[ref-refresh-keys]: /reference/data-model/cube#refresh_key
184+
[ref-pre-aggregations]: /reference/data-model/pre-aggregations
185+
[ref-sub-query]: /reference/data-model/dimensions#sub_query
186+
[ref-granularities]: /reference/data-model/dimensions#granularities
187+
[ref-drill-members]: /reference/data-model/measures#drill_members
188+
[ref-rolling-window]: /reference/data-model/measures#rolling_window
189+
[ref-dynamic-data-models]: /product/data-modeling/dynamic
190+
[ref-jinja]: /product/data-modeling/dynamic/jinja
191+
[ref-continuous-deployment]: /product/deployment/cloud/continuous-deployment

0 commit comments

Comments
 (0)