IICS Java Transformation to perform byte-based substring
Posted by: Informatica Success Portal
The attached two mapplets contain reusable java transformation code which can perform byte-based substring on input sting data.
Other parameters that can be provided are string length and codepage.
This is especially helpful for code that was converted from PowerCenter (in short, PC) to IDMC and that results in data truncation at the target.
Overview
The attached two Mapplets can be used in situations where the PC mapping is using an Oracle target which has a VARCHAR2(4000 CHAR) and source data has bigger size string than that.
In PC, the Oracle driver was able to automatically handle the first 4000 bytes and ignore the rest of the characters.
In IDMC, sometimes we see the error like:
FnName: Execute -- [Informatica][ODBC Oracle Wire Protocol driver]String data, right truncated. Error in parameter 4.
To get similar behavior like PC, we can use this Java Transformation which will substring the first 4000 bytes.
This Java transformation has an option to dictate the number of bytes needed and codepage. Length and codepage are optional. If not provided, default 4000 and UTF-8 will be used.
The first mapplet is for Java transformation with one input-output field and the second one can be used if you have more than one input-output field needs to have a similar substring.
Features
- The Java transformation needs no additional jars
Resources
- Check attached README.docx file
Support
For technical issues persisting after using the tool, please contact Informatica Global Customer Support.