Skip to main content

Overview

This section explains how to customize the cube’s schema. You can add, remove, or modify fields from new or default stores by creating specific Beans and importing them into LimitsAppConfig.class.
Any customizations to the default schema may cause issues with the default cube configuration.

Customize the schema selection

1. (Optional) Modify the schema selection description

You can only turn fields that are already in the schema selection into levels.
The cube selection is created by retrieving all fields from a datastore, so adding an extra field to an existing store will also add it to the selection. Only fields in new datastores need a change on the selection.
You can add fields to the schema selection by creating a Spring Bean with type UnaryOperator<CanUseOtherReference>. For example:
Depending on the new store being added, fields may need to be excluded from the selection to avoid a conflict.

2. Add new dimensions, hierarchies, and levels

You can now turn the field in the schema selection into a level in the cube. Dimensions, hierarchies, and levels can be added to the cube configuration by creating Spring Beans with type DimensionsAdder. For example:
The order has been set to 50 so that this dimension is added after the existing dimensions (order=20) and before the epoch dimension (order=99).

3. Import the Spring Bean

Once the bean is created, import it into the project. See Import Spring beans into the project on how to do this. Once done, Spring will use the custom bean when configuring the schema.