Search code examples
database-migrationtalend

How to migrate String Datatype column to BigDecimal Datatype column in Talend


I have old DB in which ID's are stored as STRING datatype. I want these data to be migrated to my new DB in which IDs as BIGDECIMAL datatype. Someone please suggest how to do that in TALEND migration tool.


Solution

  • You can do it using tMap expression builder, see the image for more details.

    enter image description here

    use expression like below with null handling.

    row1.id!=null?new BigDecimal(row1.id):new BigDecimal(0)