Configuring schema selections using Spring Beans

This page describes the extension points introduced in MR 4.0.0 that allow you to customize the schema selections through Spring Beans.

Concept

Schema selections for individual datastores are now configurable through Spring Beans.

Several bean types are used to configure the selection:

Bean type Details Datastores
Function<IDatastoreSchemaDescription, ISelectionDescription> Main schema selection bean, which takes a datastore schema description and applies a series of selection API calls, resulting in a selection description. All datastores expose this bean.
BiFunction<IDatastoreSchemaDescription, String , T> The base selection for a given datastore and base store name. Used as a parameter for the main bean, will be applied to the created selection description. All datastores expose and apply this bean.
BiFunction<CanUseOtherReference, String , T> Common selection for multiple datastores. Used as a parameter for the main bean, will be applied to the created selection description. Exposed by the common datastore configuration. Applied to the selections of the complete Sensitivity, PnL, and VaR datastores.
List<UnaryOperator<CanUseOtherReference>> Extra selections for a given datastore. Used as a parameter for the main bean, will be applied to the created selection description. All datastores apply this bean.

note

The T class used in the table above is an extension of the ActivePivot core CanUseOtherReference and CanBuild interfaces.

Most schema selections are configured by default to select all fields in the base store. Therefore, fields added to those stores don’t require a customization to the schema selection.

This mechanism is intended to support use-cases where the default behaviour is inappropriate:

  • a field is added to the store for direct queries only, and shouldn’t be included in the cube
  • a key field is added to multiple stores and the references between them, and shouldn’t be selected multiple times
  • the selection of the common stores (e.g. Trade Attributes, BookHierarchy) needs to be changed
  • the selection for an entire datastore needs to be modified

Available Qualifiers

The customization Beans are annotated with a @Qualifier, explicitly defining the datastore to which the customization applies.

All @Qualifier constants are defined in the SpringConstants class.

Constant Qualifier Datastore
SP_QUALIFIER__COMMON_SCHEMA_SELECTION “common-schema-selection” Common
SP_QUALIFIER__PNL_BASE_SELECTION “pnl-base-selection” PnL
SP_QUALIFIER__PNL_EXTRA_SELECTION “pnl-extra-selection” PnL
SP_QUALIFIER__PNL_SCHEMA_SELECTION “pnl-schema-selection” PnL
SP_QUALIFIER__PNL_SUMMARY_BASE_SELECTION “pnl-summary-base-selection” PnL Summary
SP_QUALIFIER__PNL_SUMMARY_EXTRA_SELECTION “pnl-summary-extra-selection” PnL Summary
SP_QUALIFIER__PNL_SUMMARY_SCHEMA_SELECTION “pnl-summary-schema-selection” PnL Summary
SP_QUALIFIER__SENSITIVITY_BASE_SELECTION “sensitivity-base-selection” Sensitivity
SP_QUALIFIER__SENSITIVITY_EXTRA_SELECTION “sensitivity-extra-selection” Sensitivity
SP_QUALIFIER__SENSITIVITY_SCHEMA_SELECTION “sensitivity-schema-selection” Sensitivity
SP_QUALIFIER__SENSITIVITY_SUMMARY_BASE_SELECTION “sensitivity-summary-base-selection” Sensitivity Summary
SP_QUALIFIER__SENSITIVITY_SUMMARY_EXTRA_SELECTION “sensitivity-summary-extra-selection” Sensitivity Summary
SP_QUALIFIER__SENSITIVITY_SUMMARY_SCHEMA_SELECTION “sensitivity-summary-schema-selection” Sensitivity Summary
SP_QUALIFIER__VAR_BASE_SELECTION “var-base-selection” VaR
SP_QUALIFIER__VAR_EXTRA_SELECTION “var-extra-selection” VaR
SP_QUALIFIER__VAR_SCHEMA_SELECTION “var-schema-selection” VaR
SP_QUALIFIER__VAR_SUMMARY_BASE_SELECTION “var-summary-base-selection” VaR Summary
SP_QUALIFIER__VAR_SUMMARY_EXTRA_SELECTION “var-summary-extra-selection” VaR Summary
SP_QUALIFIER__VAR_SUMMARY_SCHEMA_SELECTION “var-summary-schema-selection” VaR Summary
SP_QUALIFIER__MARKET_DATA_BASE_SELECTION “market-data-base-selection” Market Data
SP_QUALIFIER__MARKET_DATA_EXTRA_SELECTION “market-data-extra-selection” Market Data
SP_QUALIFIER__MARKET_DATA_SCHEMA_SELECTION “market-data-schema-selection” Market Data

Suggested Further Reading