Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Talend Folks,
I need to convert the below SQL case statement While using tmap component in talend
(SUM(case
when t1.NET < 0
then (t1.NET*-1)
else
t1.NET
end)) AS NET
Hi,
Just get the absolute value of NET field:
Hope this helps.
Hello,
You can use the tMap variables and do your query using the Talend's condition :
row1.myKey.equals("FirstValue")?1:0
In your case, you will create variable which value is t1.NET*-1 if t1.NET < 0 else t1.NET and after you will map your variable to the ouput and add the sum function to the variable.
Thanks,
Med
Thanks,
Med