Warehouse Position - Roll Up
Roll Up in Single Row mode is only available in environments 13.x or higher. Roll Up in Batch mode is fully supported.
Roll Up is the summing of some values from the Position Detail table and inserting the result into the fields of Position table. The Roll Up functionality will trigger by default if the MC events log set to either All Information or Status only for the stream eagle_ml-2-0_default_in_xml_warehouse .
In one of the rules for the Warehouse Position data loading, it calls the stored procedure to roll up the values in the HOLDINGDBO.POSITION_DETAIL table into the HOLDINGDBO.POSITION table. The rows with the same key (Entity Id + Effective Date + Source Name) will be updated.
If batch mode of data loading is used, the stored procedure for roll up will be called in the main rule ‘eagle_default/in/xml/xml-warehouse_v2.xml’ rule.
If the UPSERT mode of data loading, the stored procedure for roll up will be called in the EOFP rule ‘eagle_default/in/xml/xml-dbdirect_invar_eofp.xml’ .
The Position DB table binds by the DB field POSITION_ID with Position Detail DB table (1:N)
After INSERT/UPDATE the procedure makes up a SUMMARY:
POSITION.POS_FLAG is switched to 'Y'
Position Cost Detail DB Table
The following fields of HOLDINGDBO.POSITION_COST_DETAIL table are defined by the sum of DB fields from Open Lot tables with the same key (Entity Id + Effective Date + Source):
POSITION DB table fields | POSITION_DETAIL DB table fields summed | EagleML elements summed |
---|---|---|
TOTAL_MARKET_VALUE | MARKET_VALUE | marketValueBase |
TOTAL_MARKET_VALUE_INCOME | MARKET_VALUE_INCOME | marketValueIncome |
TOTAL_PAR_VALUE | SHARE_PAR_VALUE | parOrShares |
TOTAL_LOCAL_MARKET_VALUE | LOCAL_MARKET_VALUE | marketValueLocal |
TOTAL_ACCRUED_INCOME_LOCAL | ACCRUED_INCOME_LOCAL | accruedIncomeLocal |
TOTAL_ACCRUED_INCOME | ACCRUED_INCOME | accruedIncome |
TOTAL_BOOK_VALUE | BOOK_VALUE | bookValue |