This page provides a description of how you can expose a field as a hierarchy. It features an example in which we expose a previously added field ‘TestField’ as a hierarchy. For a full walk-through on how this was done, see Adding a Field. The techniques employed are generic examples that can be extended, adapted and repeated for any use case that we need. To avoid forking library code, all extensions are made by subclassing the relevant configuration class from theDocumentation Index
Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
Use this file to discover all available pages before exploring further.
cvarc-starter, cvarc-ba-config or cvarc-sa-config library modules and wiring the subclass into your project’s ApplicationConfig in the cvarc-application module.
Step 1 - extending the cube dimension config
To expose a field as a hierarchy, create a project-specific subclass of the dimension config rather than editing the library class directly. Incvarc-application/src/main/java/com/activeviam/cvarc/application/cfg/extensions/, create:
CustomBACubeDimensionConfigextendingBACubeDimensionConfig(for the BA cube)CustomSACubeDimensionsConfigextendingSACubeDimensionsConfig(for the SA cube)
@Configuration and @Primary, override the dimensions(...) method, call super.dimensions(builder), and append the new hierarchy.
Prerequisite informationTo learn more about navigating the managerDesc, see Navigating managerDesc.
@Import list of ApplicationConfig in cvarc-application/src/main/java/com/activeviam/cvarc/application/cfg/ApplicationConfig.java.
Step 2 - extending the cube’s selection
The selection for each cube is exposed on the bean viaschemaSelectionDescription(IDatastoreSchemaDescription) in BACubeConfig / SACubeConfig (in the cvarc-starter library module). That method delegates to the public static helpers createBASelection(...) / createSASchemaSelectionDescription(...), which build the selection chain. Static helpers cannot be overridden, so the extension overrides the non-static schemaSelectionDescription method and rebuilds the selection — selection descriptions are immutable, so post-processing the parent’s result is not viable.
In cvarc-application/src/main/java/com/activeviam/cvarc/application/cfg/extensions/, create a CustomBACubeConfig extends BACubeConfig (or CustomSACubeConfig extends SACubeConfig), annotated with @Configuration and @Primary, and override schemaSelectionDescription to mirror the parent’s selection and append the reference to your new field’s store.
Make sure that any new field added to the selection does not exist in the selection already, and that it points to a corresponding field in a datastore.
CustomBACubeConfig (or CustomSACubeConfig) to the @Import list of ApplicationConfig. The same pattern applies to the SA cube — override schemaSelectionDescription on CustomSACubeConfig extends SACubeConfig.