Documentation
Data Model

Data Model

Data model editor provides the code-first experience for building and enhancing the data model of your semantic layer from within your web browser.

Unlike the Visual Model editor, it provides the freedom to use all available data modeling features at the expense of a code-centric experience.

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

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: