mappingtalendtmapdata-integration

Transform columns on Talend using TMAP


So I have this table as an input:

enter image description here

The "numero" column is either of "Type" 7 or 2. What I want as an output is this

enter image description here

My tmap does not seem to work correctly. Can anybody suggest me a way to solve this?

enter image description here


Solution

  • If row1.Type is an integer, the condition in the expression that defines your variables should use the == operator and not the .equals("") method. For Var.Portable, row1.Type == 2 ? row1.Numero : null