Derivation is a data enrichment function that can be used to enhance the data in a dataset with calculated attributes based on predefined rules at runtime. The enriched data can then be used for consumption in downstream processes such as allocation. In the event that the data to be derived is already available in the source data, then the derived data will only be overwritten if the condition values are met. Otherwise, the source values will still be retained.
As a prerequisite, ensure you have made available either the data model or the output from another function that has to be enriched. The attributes for enrichment should be available at the calculation unit level or at the environment level, based on the level at which the data enrichment is to be executed. You have identified the conditions that form the basis for the data enrichment.
On the Derivation page, under the Fields roadmap step, choose an Input Function ID from the dropdown list.
Choose the View type - either Projection or Aggregation based on the business requirement.
Choose Add to add the attributes and mark them as Calculated Attributes.
Set the condition fields by selecting the source category as Condition.
Set the action fields by selecting the target category as Action
In the Rules roadmap step, add the rules by clicking the Add button.
There is also the option of importing the rules from Microsoft Excel if the rules are to be imported from other systems.
For more information about maintaining the rules for derivation, see the appendix.
Save the data.
Choose Generate.
To preview the results, choose Test.
Scenario: Derivation
Contract |
Product |
Cost Center |
Amount |
Premium |
---|---|---|---|---|
100000001 |
P1 |
CC01 |
100 |
200 |
100000002 |
P2 |
CC02 |
150 |
400 |
100000003 |
P3 |
CC03 |
200 |
550 |
100000004 |
P4 |
CC04 |
250 |
700 |
100000005 |
P1 |
CC05 |
300 |
850 |
100000006 |
P2 |
CC06 |
350 |
1000 |
100000007 |
P3 |
CC07 |
400 |
1150 |
100000008 |
P4 |
CC08 |
450 |
1300 |
100000009 |
P3 |
CC09 |
500 |
1450 |
100000010 |
P4 |
CC10 |
550 |
1600 |
100000011 |
P1 |
CC01 |
600 |
1750 |
100000012 |
P2 |
CC02 |
650 |
1900 |
100000013 |
P3 |
CC03 |
700 |
2050 |
100000014 |
P4 |
CC04 |
750 |
2200 |
100000015 |
P3 |
CC05 |
800 |
2350 |
100000016 |
P4 |
CC06 |
850 |
2500 |
100000017 |
P1 |
CC07 |
900 |
2650 |
100000018 |
P1 |
CC08 |
950 |
2800 |
100000019 |
P2 |
CC09 |
950 |
2950 |
Product |
Cost Center |
Base: Asset Revenue |
Asset Category (CIC) |
---|---|---|---|
P1 |
CC01 |
“Amount” |
Stock |
P2 |
* |
“Premium” |
Transit |
In this example, the Product and the Cost Center are the condition fields and the Base: Asset Revenue and Asset Category are determined as the action fields. For example, if the product is P1 and the cost center is CC01, the system inserts the value of the ‘Amount’ in the source as the Base: Asset Revenue value and the value of ‘Stock’ as the Asset Category value.
Contract |
Product |
Cost Center |
Amount |
Premium |
Base: Asset Revenue |
Asset Category |
---|---|---|---|---|---|---|
100000001 |
P1 |
CC01 |
100 |
200 |
100 |
Stock |
100000002 |
P2 |
CC02 |
150 |
400 |
400 |
Transit |
100000003 |
P3 |
CC03 |
200 |
550 |
||
100000004 |
P4 |
CC04 |
250 |
700 |
||
100000005 |
P1 |
CC05 |
300 |
850 |
||
100000006 |
P2 |
CC06 |
350 |
1000 |
1000 |
Transit |
100000007 |
P3 |
CC07 |
400 |
1150 |
||
100000008 |
P4 |
CC08 |
450 |
1300 |
||
100000009 |
P3 |
CC09 |
500 |
1450 |
||
100000010 |
P4 |
CC10 |
550 |
1600 |
||
100000011 |
P1 |
CC01 |
600 |
1750 |
600 |
Stock |
100000012 |
P2 |
CC02 |
650 |
1900 |
1900 |
Transit |
100000013 |
P3 |
CC03 |
700 |
2050 |
||
100000014 |
P4 |
CC04 |
750 |
2200 |
||
100000015 |
P3 |
CC05 |
800 |
2350 |
||
100000016 |
P4 |
CC06 |
850 |
2500 |
||
100000017 |
P1 |
CC07 |
900 |
2650 |
||
100000018 |
P1 |
CC08 |
950 |
2800 |
||
100000019 |
P2 |
CC09 |
950 |
2950 |
2950 |
Transit |
Operators |
Example |
Description |
Description |
---|---|---|---|
!= |
!= ABC |
Not Equal To |
|
In |
In (’BD’, ’BC’, ’BE’, ’BF’) |
In |
Single quotes required to consider value as a value and not as operator, value specified without single quotes considers IN as operator |
Not In |
Not In A;B;C |
Not In |
Single quotes required to consider value as a value and not as operator, value specified without single quotes considers IN as operator |
Like |
Like Abc* |
Like (regex/wildcard) |
|
Not Like |
Not Like Abc* |
Not Like (regex/wildcard) |
Operators |
Example |
Description |
Comments |
---|---|---|---|
!= |
!= 10 |
Not Equal To |
|
In |
In 1;2 |
In |
|
Not In |
Not In 1;2 |
Not In |
|
> |
>20 |
Greater Than |
|
>= |
>=20 |
Greater Than or Equal |
|
< |
<10 |
Description: Less Than |
|
<= |
<=10 |
Less Than or Equal |
|
Between |
Between 20 and 30 |
Between |
|
Complex Expressions |
“AMOUNT”-(“AMOUNT”*0.1) |
The expression can contain a combination of: * a. even number of open and close braces * b. arithmetic operators (+, -, *, /) |