balm_aggr_dim_nm
1. Description
Balm_aggr_dim_nm program reads a cf file which is in metadata format and aggregates the principal amount and rate principal amount weighted grouped by llg, currency, cashflow type and item id for the non maturity products like current account, saving account, etc.
Note: If item_id is not provided, then this program works similar to balm_aggr_nm program.🔗
2. Program location
<installation_path>/balm_aggr_dim_nm
3. Input
Click ⬇️ to download the sample data.
3.1 Mandatory Parameters
# | Parameters | Description | Example |
---|---|---|---|
1 | as_on_date | The date for which the program has to run. | 03-10-2023 |
2 | input_file_path | Path to the input file. | test-bed/cf-out-equity.cf |
3 | output_file_path | Path to the output file. | test-bed/gl |
4 | log_file_path | Path to write logs. | test-bed/log.txt |
5 | diagnostics_file_path | Path to write diagnostics logs. | test-bed/diag_log.txt |
6 | src_local_ccy | Source local currency. 🔗 | INR |
7 | display_local_ccy | Display local currency. 🔗 | RUP |
8 | consol_ccy | Consolidated currency. 🔗 | INR |
9 | currency_conversion_file_path | The path to the exchange rate file.🔗 | test-bed/1000ExchangeRate.txt |
10 | req_fields_file_path | The 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 |
11 | account_metadata_file_path | It is a path to a json file that represents the metadata ,i.e., schema of input file. 🔗 | test-bed/metadata-equity.json |
12 | rules_file_path | The path to the file that contains rules by which to aggregate accounts. 🔗 | test-bed/rules-equity.txt |
13 | default_llg_code | If no rules are satisfied, then this llg code will be used. | 08888 |
14 | dim_id | It is the dimentional id. It will remain same for all inputs. It is used for stamping purpose only. | SEG |
3.2 Non Mandatory Parameters
# | Parameters | Description | Default value | Example |
---|---|---|---|---|
1 | is_consolidated | Is 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.🔗 | false | true or false |
2 | is_amt_abs | The flag that decides whether amount should be taken as absolute or not. | true | true or false |
3 | log_level | Level of diagnostics written to the log file. | info | error/warn/info/debug/trace/none |
4 | is_perf_diagnostics_enabled | The flag that decides whether performance diagnostics will be written to the diagnostics log file. | false | true or false |
5 | npa-values | NPA 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 |
6 | interest_decimal_precision | The value which decides the interest rate round off precision. | 4 | 4 |
7 | amount_decimal_precision | The value which decides the amount value round off precision. | 2 | 2 |
Required field file
# | Parameters | Description | Example |
---|---|---|---|
1 | concat | any non empty string | branch_cd |
2 | prin_amt | principal amount | net_bal |
3 | curr | currency | curr |
4 | country | country | "" |
5 | acc_no | account number | gl_cd |
6 | int_rt | interest rate | "" |
7 | item_id | Item id for aggregation purpose. If not provided, then it will take "NA" as value and won't consider item_id for aggregation and the program will work similar to balm_aggr_nm program. | branch_cd |
8 | npa | npa field | "" |
4. Output
4.1 Output file-1 : Aggregated Output
It will be uploaded in DimMasterProductTotals table.
# | Field | Description | Columns | Example |
---|---|---|---|---|
1 | llg.category | LLG code as per the rule satisfied or default value. 🔗 | SubType_ID | 8888 |
2 | llg.item_id | Extra field for aggregation purpose.If not provided, then it will take "NA" as value and won't consider item_id for aggregation and the program will work similar to balm_aggr_m program. If provided, lets say item_id=acc_no, then the aggreagtion will be based on acc_no alongside with llg, currency and cashflow type. | Item_ID | 1018 |
3 | llg.dim_id | Dimentional id for stamping purpose only. | Dim_ID | SEG |
4 | as_on_date | Date of operation as passed through input. | As_On | 03-10-2023 |
5 | llg.currency | Currency type for the amount displayed in the subsequent columns. | Currency_ID | INR |
6 | ALL | Hardcoded | SLRorIRS | ALL |
7 | llg.cf_type | Outflow or Inflow. 🔗 | CashflowType | O or I |
8 | tot_prin_amt | Total principal amount. 🔗 | Amount | 257369007.28 |
9 | rt_prin_amt_weighted | Rate principal amount weighted. 🔗 | InterestRate | 0.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(consisting of llg.currency, llg.category and llg.cf_type) and item_id.
tot_prin_amt = Σ prin_amt
Note: If is_amt_abs is set, then before summation take absolute value of principal amount.
rt_prin_amt_weighted :
Aggregated on the basis of LLGkey generated(consisting of llg.currency, llg.category and llg.cf_type) and item_id.
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.
5. Process configuration in streamdef table:
.........
"processName": "GL Dimensional Aggr",
"processId": "2",
"processBinary": "{SH_PROGRAMS}/balm_aggr_dim_nm",
"processArguments": [
"--as-on-date",
"{AsOnDate}",
"--input-file",
"{SH_CFDATA}/IND/{ddmmyyyy}/gl.cf",
"--output-file",
"{SH_SUMMARYDATA}/IND/BALM/{ddmmyyyy}/dim_balm_gl",
"--log-file",
"{SH_LOGS}/IND/BALM/{ddmmyyyy}/dim_balm_gl_log.txt",
"--diagnostics-log-file",
"{SH_LOGS}/IND/BALM/{ddmmyyyy}/dim_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/dim_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/dim_balm_gl_rules.txt",
"--default-llg-code",
"08888",
"--dim-id",
"SEG"
],
"processDependencies": [],
"processReport": "{SH_SUMMARYDATA}/IND/BALM/{ddmmyyyy}/dim_balm_gl-summary-health-check-report.json",
"processType": "AGGR",
"infoLog": "{SH_LOGS}/IND/BALM/{ddmmyyyy}/dim_balm_gl_log.txt",
"errorLog": ""
.........