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.
Visual Modeler is available in Cube Cloud on Enterprise (opens in a new tab) tier. Contact us (opens in a new tab) for details.
Cube Visual Modeler is currently in preview.
Getting started
Contact your Cube account team to enable Cube Visual Modeler.
Cube Visual Modeler replaces the 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.
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:
- In your Cube deployment's settings, under the Build & Deploy tab, connect it to a Git repository.
- Disable direct commits to the main branch and disable merging to the main branch.
See the 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 depending on your needs.
To open Visual Modeler, click on the Show Canvas button in the top right of the Data Model page. Visual Modeler will stay open until you go back to the code editor by clicking the View Code button or Show Code on any cube or view node.
Cubes
Adding cubes
To add a cube, click the Add Cube 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.
Note that you cannot add measures at this step. To do so, first add your cube, then follow the instructions in Editing cubes or Adding dimensions and measures below.
Editing cubes
To edit a cube, first select the cube on the canvas by clicking on it. Then, in the sidebar, click Edit 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 and Working with joins sections below.
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 Add Dimension or Add Measure.
Working with joins
You can add or edit joins via the "Relationships" section of the Edit Cube dialog (see "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.
Views
Adding views
To add a view, click the Views tab at the top of the canvas. Then, click Add View. 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.
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 Edit 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) or inspect the YAML you've generated before submitting it.
To access YAML mode, click the Create with YAML or Edit with YAML button at the bottom of the dialog.
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 or in the data model code editor.
For example, the following are not included in Visual Modeler:
- Meta tags
- Segments
- Refresh keys, pre-aggregations, subqueries, or granularities on dimensions
- Drill members or rolling windows 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 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 or models which use Jinja, although they will still be displayed on the canvas.