SAP / SAP/node-hdb

Data corruption for NCLOB fields

Open
#200 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
322
Forks
99
PR merge metrics
No merged PRs in 30d

Description

Hello,
we're working on a CAP project and decided to use @sap/cdx-mtx library for multitenancy. Our project heavily uses CSV files to seed initial data.
It was found that cds-mtx writes CSV data with hdb library to HDI Container to NCLOB field, then it reads the same CSV data and hdb library returns this data corrupted. For some files (every time the same), but not all some data has repeating symbols, e.g. 100002 instead of 10002, Serbiaan instead of Serbian. I've tried to open TENANT_FILES table with Database Explorer and exactly in place of symbol duplication DE truncates the field. I've also tried to open the same table with DBeaver and data looks fine in the database itself.
How to debug this? What should we check?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file, test, or entry point is named. Start by reproducing the NCLOB write and read through the hdb library with the affected CSV values, then compare the returned data with the database views from Database Explorer and DBeaver. Done means identifying the corruption boundary and documenting a reproducible failing case with a verified fix or clear diagnosis.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.