Skip to content

Fix RBI NACH scraping to capture bank_code and bank_name correctly#459

Open
PriyankaMarbill wants to merge 4 commits into
masterfrom
fix/rbi-nach-bank-code-name-scraping
Open

Fix RBI NACH scraping to capture bank_code and bank_name correctly#459
PriyankaMarbill wants to merge 4 commits into
masterfrom
fix/rbi-nach-bank-code-name-scraping

Conversation

@PriyankaMarbill

Copy link
Copy Markdown
Contributor

RBI added a Bank Name column (index 2) to the NACH participation table, shifting column indices for MICR/IFSC/IIN/ACH onwards. The scraper was reading the wrong columns for bank_code and silently dropping bank_name.

Also, RBI periodically renames columns in the RTGS/NEFT CSV exports (e.g. "IFSC Code" instead of "IFSC", "Bank Name" instead of "BANK"). The CSV parser now normalises column names via an alias map so column renames no longer silently drop data.

Changes:

  • methods_nach.rb: capture bank_name from data[2] (new RBI column) and pass it through bank_data; parse_nach extracts it per row
  • methods.rb: add RBI_HEADER_ALIASES + helpers to normalise CSV column names; update parse_csv to build a header map on first data row; add normalize_bank_name_for_guidelines to apply CONTRIBUTING.md rules mechanically; add export_banknames to emit data/banknames.json with the most-frequent RBI name per bank code merged with existing src/banknames.json; update merge_dataset to prefer the RBI-supplied bank name over the static lookup; update parse_imps to fall back to NACH bank_name for codes not yet in banknames.json; fix IFSC skip check to also handle "IFSC Code" header rows mid-sheet
  • generate.rb: call export_banknames after dataset is built
  • CONTRIBUTING.md: note that the scraper auto-applies name guidelines

Note :- Please follow the below points while attaching test cases document link below:

- If label Tested is added then test cases document URL is mandatory.

- Link added should be a valid URL and accessible throughout the org.

- If the branch name contains hotfix / revert by default the BVT workflow check will pass.

Test Case Document URL
Please paste test case document link here....

RBI added a Bank Name column (index 2) to the NACH participation table,
shifting column indices for MICR/IFSC/IIN/ACH onwards. The scraper was
reading the wrong columns for bank_code and silently dropping bank_name.

Also, RBI periodically renames columns in the RTGS/NEFT CSV exports
(e.g. "IFSC Code" instead of "IFSC", "Bank Name" instead of "BANK").
The CSV parser now normalises column names via an alias map so column
renames no longer silently drop data.

Changes:
- methods_nach.rb: capture bank_name from data[2] (new RBI column) and
  pass it through bank_data; parse_nach extracts it per row
- methods.rb: add RBI_HEADER_ALIASES + helpers to normalise CSV column
  names; update parse_csv to build a header map on first data row;
  add normalize_bank_name_for_guidelines to apply CONTRIBUTING.md rules
  mechanically; add export_banknames to emit data/banknames.json with
  the most-frequent RBI name per bank code merged with existing
  src/banknames.json; update merge_dataset to prefer the RBI-supplied
  bank name over the static lookup; update parse_imps to fall back to
  NACH bank_name for codes not yet in banknames.json; fix IFSC skip
  check to also handle "IFSC Code" header rows mid-sheet
- generate.rb: call export_banknames after dataset is built
- CONTRIBUTING.md: note that the scraper auto-applies name guidelines

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@PriyankaMarbill PriyankaMarbill added the TestingNotRequired TestingNotRequired label for BVT label Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

TestingNotRequired TestingNotRequired label for BVT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant