Skip to content

Commit 6fd6fd0

Browse files
Michael IrvineMichael Irvine
authored andcommitted
feat(docs): adds visual modeler page
1 parent ae86e50 commit 6fd6fd0

File tree

2 files changed

+158
-0
lines changed

2 files changed

+158
-0
lines changed

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",
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
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+
<Screenshot
16+
src="https://ucarecdn.com/2517fe8b-b492-4e75-a9ea-e4c2999dff93/"
17+
alt="Visual modeler screenshot"
18+
/>
19+
20+
## Using Visual Modeler
21+
22+
Cube Visual Modeler lets you see and edit your Cube data model in an easy-to-use,
23+
graphical interface. You can also switch seamlessly between Visual Modeler and
24+
the original code-based [Data Model editor][ref-data-model] depending on your needs.
25+
26+
To open Visual Modeler, click on the "Show Canvas" in the top right of the Data Model
27+
page. Visual Modeler will stay open until you go back to the code editor by clicking
28+
the "View Code" button or "Show Code" on any cube or view node.
29+
30+
<Screenshot
31+
src="https://ucarecdn.com/b2b6af54-f17c-4a0c-9963-15a5d0dcc5f6/"
32+
alt="View Code button"
33+
/>
34+
35+
## Cubes
36+
37+
### Adding cubes
38+
39+
To add a cube, click the "Add Cube" button in the top left of the Visual Modeler
40+
screen. This brings up the Add Cube dialog where you can select a table from your
41+
database, choose dimensions and primary keys, and review your choices before
42+
submitting.
43+
44+
<InfoBox>
45+
Note that you cannot add measures at this step. To do so, first add your cube,
46+
then follow the instructions in [Editing cubes](#editing-cubes) or [Adding
47+
dimensions and measures](#adding-dimensions-and-measures) below.
48+
</InfoBox>
49+
50+
<Screenshot
51+
src="https://ucarecdn.com/5738b483-91f2-436c-9768-ba7858a6f1c1/"
52+
alt="Add cube dialog"
53+
/>
54+
55+
### Editing cubes
56+
57+
To edit a cube, first select the cube on the canvas by clicking on it. Then, in
58+
the sidebar, click "Edit" in the top right. This brings up a modal where you can
59+
edit the cube's details (name, title, SQL, etc.), dimensions, measures, and
60+
relationships.
61+
62+
You may use this dialog to add dimensions, measures, and joins, or do so via the
63+
[Adding dimensions and measures](#adding-dimensions-and-measures) and [Working
64+
with joins](#working-with-joins) sections below.
65+
66+
<Screenshot
67+
src="https://ucarecdn.com/09c12fc2-b4d3-4e96-a05c-002f7f0dcc5e/"
68+
alt="Edit cube dialog"
69+
/>
70+
71+
### Adding dimensions and measures
72+
73+
To add a dimension or measure, first select a cube on the canvas by clicking on
74+
it. Them, in the sidebar, click "Add Dimension" or "Add Measure."
75+
76+
<Screenshot
77+
src="https://ucarecdn.com/9a009f04-18bd-4573-ac8a-d50641bcbf55/"
78+
alt="Add measure dialog"
79+
/>
80+
81+
### Working with joins
82+
83+
You can add or edit joins via the "Relationships" section of the Edit Cube dialog
84+
(see "[Editing cubes](#editing-cubes)" above).
85+
86+
Visual Modeler also lets you add joins visually by dragging a line on the canvas
87+
from the side of one dimension to another.
88+
89+
<YouTubeVideo
90+
url="https://drive.google.com/file/d/1t5RPLLv9CsKvpqeRm0Dh3pnfmpADP1hq/preview"
91+
alt="Adding a join"
92+
/>
93+
94+
## Views
95+
96+
### Adding views
97+
To add a view, click the "Views" tab at the top of the canvas. Then, click "Add
98+
View". This brings up a dialog where you can choose the base cube, set the view
99+
details such as name and title, and add joins and join paths.
100+
101+
<Screenshot
102+
src="https://ucarecdn.com/ce5e9014-2ce6-4aa8-a811-469617708684/"
103+
alt="Adding a view"
104+
/>
105+
106+
### Editing views
107+
108+
The same dialog may be used to edit existing views by selecting the view in the
109+
dropdown, clicking on it in the canvas, and clicking "Edit" in the sidebar.
110+
111+
## YAML mode
112+
113+
All the dialogs mentioned above have a "YAML mode" where you can see and edit
114+
the Cube YAML generated by Visual Modeler. This lets you add properties that
115+
are not natively supported by the Visual Modeler GUI (for example [meta
116+
tags][ref-meta]) or inspect the YAML you've generated before submitting it.
117+
118+
To access YAML mode, click the "Create with YAML" or "Edit with YAML" button
119+
at the bottom of the dialog.
120+
121+
<Screenshot
122+
src="https://ucarecdn.com/d8c15304-571d-4a3a-a58d-1574ab4d1712/"
123+
alt="YAML mode"
124+
/>
125+
126+
## Limitations
127+
128+
Cube Visual Modeler does not natively support some features of the Cube data
129+
model when adding or editing cubes and views. However, these may be added via
130+
[YAML mode](#yaml-mode) or in the [data model code editor][ref-data-model].
131+
132+
For example, the following are not included in Visual Modeler:
133+
- [Meta tags][ref-meta]
134+
- [Segments][ref-segments]
135+
- [Refresh keys][ref-refresh-keys], [pre-aggregations][ref-pre-aggregations], [subqueries][ref-sub-query], or [granularities][ref-granularities] on dimensions
136+
- [Drill members][ref-drill-members] or [rolling windows][ref-rolling-window] on measures
137+
138+
Cubes and views using those features will still be displayed in
139+
Visual Modeler, but those fields can only be edited via [YAML mode](#yaml-mode)
140+
or in the code editor.
141+
142+
Additionally, Visual Modeler only allows editing of cubes and views that are
143+
defined in YAML, not JavaScript, and it does not allow editing of [dynamic data
144+
models][ref-dynamic-data-models] or models which use [Jinja][ref-jinja], although
145+
they will still be displayed on the canvas.
146+
147+
[ref-data-model]: /product/workspace/data-model
148+
[ref-meta]: /reference/data-model/cube#meta
149+
[ref-segments]: /reference/data-model/segments
150+
[ref-refresh-keys]: /reference/data-model/cube#refresh_key
151+
[ref-pre-aggregations]: /reference/data-model/pre-aggregations
152+
[ref-sub-query]: /reference/data-model/dimensions#sub_query
153+
[ref-granularities]: /reference/data-model/dimensions#granularities
154+
[ref-drill-members]: /reference/data-model/measures#drill_members
155+
[ref-rolling-window]: /reference/data-model/measures#rolling_window
156+
[ref-dynamic-data-models]: /product/data-modeling/dynamic
157+
[ref-jinja]: /product/data-modeling/dynamic/jinja

0 commit comments

Comments
 (0)