Documentation
Data Model

Data Model

With the web-based data model editor, you can write and test and your Cube data model from your browser.

Data model editor is available in Cube Cloud on all product tiers (opens in a new tab).

Cube Cloud can create branch-based development API instances to quickly test changes in the data model in your frontend applications before pushing them into production.

Development Mode

In development mode, you can safely make changes to your project without affecting production deployment. Development mode uses a separate Git branch and allows testing your changes in Playground or via a separate API endpoint specific to this branch. This development API hot-reloads your data model changes, allowing you to quickly test API changes from your applications.

To enter development mode, navigate to the Data Model screen and click Dev Mode.

Entering dev mode

If you are entering development mode from the main branch, you will be asked to choose an existing branch or create a new one. You can configure whether it's possible to commit directly to the main branch in the deployment settings.

Entering dev mode modal

When development mode is active, the status of the development API will be shown at the top of the screen. After any changes to the project, the API will hot-reload, and the API status will indicate when it's ready.

You can exit development mode by clicking Dev Mode X in the purple banner. If you've been editing a data model and navigate away, Cube Cloud will warn you if there are any unsaved changes:

Unsaved changes warning modal

Data Graph

For Cube Cloud customers on the Enterprise (opens in a new tab) tier, the Data Graph is replaced by Visual Modeler. Please see the Visual Modeler page for more details.

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 Show Graph in the top right part of the data model editor to open Data Graph:

Data Graph visualizes cubes and joins between them as an entity-relationship diagram (opens in a new tab) (ERD). It allows to have a bird's-eye view of the data model and visually detect connected parts, i.e., groups of cubes that don't have any relationships with other groups.

For clarity, only dimensions and custom SQL expressions used in joins are shown. Join relationship types are depicted with the crow's foot notation:

  • Dash represents one in one_to_one and one_to_many types
  • Crow's foot represents many in one_to_many and many_to_one types

You can pan and zoom the visualization, search cubes using the input box, hover over cubes to highlight their relationships, and click Show Code to view their code.

Git integration

To add more Git branches to your Cube Cloud deployment and/or switch between them, click the branch name in the status bar:

Branch switcher

Speaking of Git branches, you can now easily add and remove branches with the same switcher; click Add Branch and enter a name for the new branch in the popup:

Create a new branch

These branches are shared, meaning everyone who has access to the deployment can see and edit them. This makes them extremely useful for out-of-band experiments where you can quickly test things in Cube Cloud without having to go through a CI/CD process.

Unused branches can also be deleted. Ensure you are already on the branch you want to delete, then open the switcher and click Remove Branch:

Delete a branch

Generating data model files

You can generate data model files when creating a new deployment or at later moment. To open the data model wizard, click on the ... button on the right and select Generate data model:

It is safe to generate data model files for tables that already have matching cubes. In that case, existing files will be renamed by appending .backup to their names. You would also be able to review changes to files on the Changes tab:

Creating pre-aggregations

If you'd like to use the UI to create a pre-aggregation, you can click on the ... button on the right and select Add rollup to open Rollup Designer: