This page provides a description of how we can add a new column calculator. It features an example in which we populate a new field to a new store. To see how this store was populated, see Adding and Populating a New Store. The techniques employed are generic examples that can be extended, adapted and repeated for any use case that is needed. In all cases, we make minimal changes to the Reference Implementation. The examples outlined in this page will build on the example in Adding and Populating a New Store.Documentation Index
Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
Use this file to discover all available pages before exploring further.
Step 1 - Datastore Modifications
Before we can load this new column into our cube, we need to make sure that our datastore has a field that can accept this column. We can follow the Adding and Populating a New Store example to create a new store or modify an existing store.Step 2 - Define column calculator
We want to define the logic of our column calculator. Below we have an example of a simple column calculator that returns a value Negative when the Custom Projected value is less than 0, and Non-Negative otherwise. We will define our custom column calculator inside:/frtb-application/src/main/java/com/activeviam/frtb/application/config/
Step 3 - DLC Config
For this step, we will be using the Data Load Controller. In the example below, we will override the topic description we have configured here. We will wire in our existing topic description and add a column calculator into the channel. Since we have given our topic description a lower order, it will fully replace any existing topic description with the same unique identifier (name and topic type). Alternatively, we can create a named Custom Field Description and add it to the channel via YAML.Step 4 - Ensure FrtbApplicationConfig picks up our modifications
For our customizations to be picked up, we must include all added Spring@Configuration classes in FrtbApplicationConfig located in /frtb-application/src/main/java/com/activeviam/frtb/application/config/.