โ03-03-2022 08:59 PM
Hi, we are migrating DB2 tables into AWS Aurora MySQL database. I am using Generic JDBC select SNAP to select the data from the DB2 database .we had an issue with data migration for the DB2 char fields . The Char fields selected from DB2 has the trailing spaces, which are getting inserted into MySQL. Is there anyway we could trim the trailing space of all the fields without individually specifying it in MAPPER SNAP to TRIM the spaces. we have around 40 tables and some of the tables has more than 20 fields โฆ Some of the tables Primary key fields are Char data type and is required to trimโฆ
Please let me know if there is any solution or the specific settings in the SNAP to trim the selected data in simpler way
โ03-03-2022 10:03 PM
Try this:
$.mapValues((v,k)=> typeof v == 'string' ? v.trim() : v)
โ03-04-2022 09:28 AM
WowโฆThank you, bojanvelevski. The expression that you have suggested is workingโฆ .