Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to write a condition in my tMap translation. It is giving me an error when trying to run. Essentially, I have a required field I am trying to populate on the Output. From the input, I first want to check one of the columns for null. If it is null, I want to use a different column to populate output. Here is what I have written, not sure what I am missing:
row1.Field1 = null ? row1.Field2 : row1.Field1
Hi,
Could you please share the screen shots of the job flow, problematic component and schema details?
Please also share the target DB. It should be something minor. Once we see the flow, we will get better idea.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
@ksingh @nthampi @uganesh Thank you all for your help!
I made a few adjustments and got it to work. Here is the final expression I used:
row1.NAME != null && row1.NAME.trim().length() != 0 ? row1.NAME : row1.NUM
I really appreciate all of your input. I'm new to Talend and this is helpful. This board is great. I will be now be a longtime user.
Weird But Good.
@steeld95 Oh Am almost close, thanks for updating the result