Skip to main content

balm_aggr_consol_2

1. Description

Balm_aggr_consol_2 program reads the aggregator output and it generates a consolidated summary of it. It can take both maturity or non maturity aggregated output as input. The output generated follows the similar structure as the input. It converts the currency type for the given input files and write the converted values consolidated summary to the respective output files.

2. Program location

<installation_path>/balm_aggr_consol_2

3.Screen Configuration

3.1 Process Config Fields

balm_aggr_cons_config_image Here enter the base input file and additional inputs required for the setup.

3.1.1 Additional Input file 🔗

This file contains:

#FileTypeDescriptionRequiredExample
1ConsolFile_pathProvide the path to the consol-config file.true{M_IN001} (this place holder will get replaced by the actual file path like test-bed/M_IN001.json) Note: We can directly provide the actual file path here.
2Exchange_RateFile_pathProvide the path to the exchange rate file.true{M_IN002} (this place holder will get replaced by the actual file path like test-bed/M_IN002.json) Note: We can directly provide the actual file path here.

3.2 Process Arguments

balm_aggr_cons_pa_image

Here enter the process arguments to be passed to the program. The non-mandatory fields are given below.

3.2.1 Non Mandatory Parameters
#ParametersDescriptionDefault valueExample
1log_levelLevel of diagnostics written to the log file.infoerror/warn/info/debug/trace/none
2perf_diag_flagThe flag that decides whether performance diagnostics will be written to the diagnostics log file.falsetrue or false
3interest_decimal_precisionThe value which decides the interest rate round off precision.44
4amount_decimal_precisionThe value which decides the amount value round off precision.22

Click ⬇️ to download the sample data.

4. Output

The number of output files generated and each file's number of columns & order depends on the type of input. The output generated follows the similar structure as the input. It just changes the currency type as per the consol-config file and consolidates the output depending on the key value.

Note: The output files name are slightly different here in comparision with balm aggregator output files name. Here, it will contain '-consol' as postfix. Example: op-1-consol.txt and op-summary-consol.txt.

is_maturity is taken as true or false based on derivation_subtype and input_files_type is taken based on derivation_type.Four possible scenarios can be there:

4.1 is_maturity=true and input_files_type:BALM

In this case, the aggregated output is from the balm_aggr_m_2 program.🔗 In this case, the input is 12 master files and 1 aggregated-summary file. Therefore, 12 master consolidated files and 1 aggreagated-summary consolidated file is generated. The 12 master consolidated files will get uploaded to respective MasterInflowConvertedN and MasterOutflowConvertedN table. N representing the file number. Aggreagated-summary consolidated file will get uploaded to tblProductTotalsConverted table.

The 12 master consolidated file follows the following order:
llg.category|as_on_date|llg.currency|Mater|cashflow_aggregated_type|amt|rate|date|amt|rate|date|...

The 1 aggreagated-summary consolidated file follows the following order:
llg.category|as_on_date|llg.currency|cashflow_aggregated_type|Mater|cashflow_type|amount|rate

4.2 is_maturity=true and input_files_type:BRWISE

In this case, the aggregated output is from the balm_aggr_dim_m_2 program.🔗 In this case, the input is 12 master files and 1 aggregated-summary file. Therefore, 12 master consolidated files and 1 aggreagated-summary consolidated file is generated. The 12 master consolidated files will get uploaded to respective DimMasterInflowConvertedN and DimMasterOutflowConvertedN table. N representing the file number. Aggreagated-summary consolidated file will get uploaded to DimMasterProductTotalsConverted table.

The 12 master consolidated file follows the following order:
llg.category|llg.item_id|llg.dim_id|as_on_date|llg.currency|cashflow_aggregated_type|amt|rate|date|amt|rate|date|...

The 1 aggreagated-summary consolidated file follows the following order:
llg.category|llg.item_id|llg.dim_id|as_on_date|llg.currency|cashflow_aggregated_type|cashflow_type|amount|rate

Description

4.3 is_maturity=false and input_files_type:BALM

In this case, the aggregated output is from the balm_aggr_nm_2 program.🔗 In this case, the input is only 1 aggregated-summary file. Therefore, only 1 aggreagated-summary consolidated file is generated. Aggreagated-summary consolidated file will get uploaded to tblProductTotalsConverted table.

The 1 aggreagated-summary consolidated file follows the following order:
llg.category|as_on_date|llg.currency|ALL|MASTER|llg.cf_type|amount|rate

4.4 is_maturity=false and input_files_type:BRWISE

In this case, the aggregated output is from the balm_aggr_dim_nm_2 program.🔗 In this case, the input is only 1 aggregated-summary file. Therefore, only 1 aggreagated-summary consolidated file is generated. Aggreagated-summary consolidated file will get uploaded to DimMasterProductTotalsConverted table.

The 1 aggreagated-summary consolidated file follows the following order:
llg.category|llg.item_id|llg.dim_id|as_on_date|llg.currency|ALL|llg.cf_type|amount|rate

Output derivation logic:

For a given input row in a particular file, read the currency type. Search for this currency type in the consol config file 'source_currency' column. Get all the matching consol_ccy destination type. Now for every consol_ccy destination, make use of the exchange rate file to get the exchange rate. Use this exchange rate to convert the subsequent amount present in the given input row. After converting the value, write it in similar structure to the respective output file row.

For example,
8888|28-02-2023|USD|Master|INT|1000.00|2000.0|...

Search for USD in the config file. Lets say the config file looks like this:
USD|INR|RUP
USD|EUR|EUR
We get two consol_ccy destination type INR and EUR.

Lets say the exchange file looks like this:
USD|INR|83.26
USD|EUR|0.95
So we convert subsequent amount and stamp them with display type:
8888|28-02-2023|RUP|Master|INT|83187.65 (1000.00*83.26)|166371.90 (2000.00*83.26)|...
8888|28-02-2023|EUR|Master|INT|947.08 (1000.00*0.95)|1894.17 (2000.00*0.95)|...

Note: If after conversion, the aggegation key(For eg: llg.category,as_on_date,llg.currency,..) becomes same as some other aggregation key, then we aggregate those amounts together.

For example,
8888|28-02-2023|USD|Master|INT|1000.00|2000.0|...
8888|28-02-2023|EUR|Master|INT|1000.00|2000.0|...
Search for USD in the config file. Lets say the config file looks like this:
USD|INR|RUP
EUR|INR|RUP
We get consol_ccy destination type INR as destination for first row.

Lets say the exchange file looks like this:
USD|INR|83.26
EUR|INR|87.38
So we convert subsequent amount and stamp them with display type:
8888|28-02-2023|RUP|Master|INT|83187.65 (1000.00*83.26)|166371.90 (2000.00*83.26)|...
Then when we go the 2nd input row, we get the consol_ccy destination type INR again. So we convert subsequent amount and stamp them with display type:
8888|28-02-2023|RUP|Master|INT|87903.64 (1000.00*87.38)|175807.28 (2000.00*87.38)|...
But this time the aggregation key matches with the first row aggregation key (8888|28-02-2023|RUP|Master|INT|), therefore we aggregate them together and write them as one:
8888|28-02-2023|RUP|Master|INT|171091.29 (83187.65+87903.64)|342179.18 (166371.90+175807.28)|...

Note: Also, if we don't get any match for the currency type in the consol config file, then those row data will be lost.

For example,
8888|28-02-2023|USD|Master|INT|1000.00|2000.0|...
Search for USD in the config file. Lets say the config file looks like this:
EUR|INR|RUP
EUR|USD|USD
We get no matches for the USD. So, for that particular column, we write nothing to the respective output file.

NOTE: No health check report is getting generated for this aggregator.