CustomProjected field from a store that was
previously added. For a walk-through on how this store was added to the cube,
see Adding and Populating a New Store.
The techniques employed are generic examples that can be
extended, adapted and repeated for any use case required. In all cases, minimal changes are made to the Reference Implementation.
Step 1 - (Optional) Modify the selection description
If the field to turn into a measure is not currently in the schema selection, then the first step is to add it. The cube selection is made by retrieving all fields from a datastore except unwanted ones, so adding an extra field to an existing store will add it to the selection. Only extra datastore fields will need a change on the selection. Fields are added to the schema selection by creating a Spring Bean with typeUnaryOperator<CanUseOtherReference> and qualifier
SchemaSelection_CUBENAME_ (for example,
SchemaSelectionStandardisedApproachCube).
For example:
Step 2 - Define measure
In this case we need to extend theSAMeasureBuilder class for creating measures.
Step 3 - Application config
Navigate to the configuration class where the original MeasureBuilder class (SAMeasureBuilder) was being used, in this case
com.activeviam.frtb.ref.cfg.applications.cubes.impl.SACubeConfigurer, and replace the old MeasureBuilder class with the newly extended one
/frtb-starter/src/main/java/com/activeviam/frtb/starter/cfg/impl/
Measure Beans
This is currently only supported by InternalModelApproachCube, StandardisedApproachCube and StressCalibrationCube.
/frtb-starter/src/main/java/com/activeviam/frtb/starter/cfg/impl/
FRTBConfig located
in /frtb-starter/src/main/java/com/activeviam/frtb/starter/cfg/impl/