Skip to main content

balm_aggr_nm

1. Description

Balm_aggr_nm program reads a cf file which is in metadata format and aggregates the principal amount and amount with interest rate grouped by llg,currency and cashflowtype for the non maturity products like current account, saving account, etc.

2. Program location

<installation_path>/balm_aggr_nm

3. Input

Click ⬇️ to download the sample data.

3.1 Mandatory Parameters

#ParametersDescriptionExample
1as_on_dateThe date for which the program has to run26-09-2023
2input_file_pathPath to the input filetest-bed/pp_gl_output.cf
3output_file_pathPath to the output filetest-bed/gl
4log_file_pathPath to write logstest-bed/log.txt
5diagnostics_file_pathPath to write diagnostics logstest-bed/diag_log.txt
6src_local_ccySource local currency. 🔗INR
7display_local_ccyDisplay local currency. 🔗RUP
8consol_ccyConsolidated currency. 🔗INR
9currency_conversion_file_pathThe path to the exchange rate file.🔗test-bed/1000ExchangeRate.txt
10req_fields_file_pathThe req_fields_file_path parameter is a path to a file that describes the names with which to refer to such fields. 🔗 Click here to see the list of required fields for this program.test-bed/gl_req_fields.json
11account_metadata_file_pathIt is a path to a json file that represents the metadata ,i.e., schema of input file. 🔗test-bed/gl_metadata.json
12rules_file_pathThe path to the file that contains rules by which to aggregate accounts. 🔗test-bed/gl_rules.txt
13default_llg_codeif no rules are satisfied, then this llg code will be used08888

3.2 Non Mandatory Parameters

#ParametersDescriptionDefault valueExample
1is_consolidatedIs consolidated flag is used to define the currency type of given amount in input field. If is_consolidated flag is set, then the amount given is of consolidated type else it is in the curr input type.🔗falsetrue or false
2is_amt_absThe flag that decides whether amount should be taken as absolute or not.truetrue or false
3is_aggr_amt_absThe flag that decides whether aggregated amount should be taken as absolute or not.falsetrue or false
4log_levelLevel of diagnostics written to the log file.infoerror/warn/info/debug/trace/none
5is_perf_diagnostics_enabledThe flag that decides whether performance diagnostics will be written to the diagnostics log file.falsetrue or false
6npa-valuesNPA values separated by comma. If any of the value is found for the given npa field(passed in required field), then rate is taken as 0 for that account.""A123,B123
7interest_decimal_precisionThe value which decides the interest rate round off precision.44
8amount_decimal_precisionThe value which decides the amount value round off precision.22

Required field file

#ParametersDescriptionExample
1concatany non empty stringbranch_cd
2prin_amtprincipal amountnet_bal
3currcurrencycurr
4countrycountry""
5acc_noaccount numbergl_cd
6int_rtinterest rate""
7npanpa field""

4. Output

4.1 Output file-1 : Aggregated Output

It will be uploaded in tblProductTotals table.

#FieldDescriptionColumnsExample
1llg.categoryLLG code as per the rule satisfied or default value. 🔗SubType_ID8888
2as_on_dateDate of operation as passed through inputAs_On26-09-2023
3llg.currencyCurrency type for the amount displayed in the subsequent columns.Currency_IDINR
4ALLhardcodedSLRorIRSALL
5MASTERhardcodedSchemeIDMASTER
6llg.cf_typeOutflow or Inflow. 🔗CashflowTypeO or I
7tot_prin_amtTotal principal amount. 🔗Amount61114535307.96
8rt_prin_amt_weightedRate principal amount weighted.🔗InterestRate0.0000

4.2 Output file-2 : Health report

The health check report gives summary about the processed accounts such as success counts, failed counts, etc.🔗

Output derivation logic:

  • tot_prin_amt :
    Aggregated on the basis of LLGkey generated, which consists of llg.currency, llg.category and llg.cf_type

    tot_prin_amt = Σ prin_amt

    Note: If is_amt_abs is set, then before summation take absolute value of principal amount.
    Also if is_aggr_amt_abs is set, then before writing to output take absolute value of total principal amount.

  • rt_prin_amt_weighted :
    Aggregated on the basis of LLGkey generated, which consists of llg.currency, llg.category and llg.cf_type

    rt_prin_amt_weighted = Σ prin_amt * int_rt / tot_prin_amt

    Note: If is_amt_abs is set, then before summation take absolute value of principal amount and interest rate. Also if is_aggr_amt_abs is set, then before writing to output take absolute value of rate principal amount weighted.

5. Process configuration in streamdef table:

  .........
"processName": "GL Aggr",
"processId": "1",
"processBinary": "{SH_PROGRAMS}/balm_aggr_nm",
"processArguments": [
"--as-on-date",
"{AsOnDate}",
"--input-file",
"{SH_CFDATA}/IND/{ddmmyyyy}/gl.cf",
"--output-file",
"{SH_SUMMARYDATA}/IND/BALM/{ddmmyyyy}/balm_gl",
"--log-file",
"{SH_LOGS}/IND/BALM/{ddmmyyyy}/balm_gl_log.txt",
"--diagnostics-log-file",
"{SH_LOGS}/IND/BALM/{ddmmyyyy}/balm_gl_diag_log.txt",
"--src-local-ccy",
"INR",
"--display-local-ccy",
"RUP",
"--consol-ccy",
"INR",
"--exchange-rate-file",
"{SH_RESOURCES}/IND/{ddmmyyyy}/exchangeRate.txt",
"--req-fields-file",
"{SH_RESOURCES}/IND/OPERATIONAL-FILES/BALM-REQ-FIELD-FILES/balm_gl_req_fields.json",
"--account-metadata-file",
"{SH_RESOURCES}/IND/OPERATIONAL-FILES/CF-METADATA-FILES/gl_metadata.json",
"--rules-file-path",
"{SH_RESOURCES}/IND/OPERATIONAL-FILES/BALM-RULE-FILES/balm_gl_rules.txt",
"--default-llg-code",
"08888"
],
"processDependencies": [],
"processReport": "{SH_SUMMARYDATA}/IND/BALM/{ddmmyyyy}/balm_gl-summary-health-check-report.json",
"processType": "AGGR",
"infoLog": "{SH_LOGS}/IND/BALM/{ddmmyyyy}/balm_gl_log.txt",
"errorLog": ""
.........