Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Please help me with this syntax.
This one cannot convert from boolean to string:
(row1.Cost_Center.equals("Cost Center")||row1.Cost_Center.equals("Work Breakdown Center")||row1.Cost_Center.equals("Network Center"))
This syntax is not working:
String.valueOf(row1.Cost_Center.equals("Cost Center")||row1.Cost_Center.equals("Work Breakdown Center")||row1.Cost_Center.equals("Network Center"))
The input schema is a String. Output schema is a String
one of the cost centers. it can be Cost Center, Work Breakdown Center, or Network Center
Hi as i see if it’s in a tmap Column: it’s because you only have the condition, there is no value set where condition is reached or not. So talend read it as a boolean
If you want to filter the cost center That respect only Your condition put Your sentence in the filter expression editor of your input. And invert string position to make it null safe (ex: "Cost Center".equals(row1.Cost_Center) instead of row1.Cost_Center.equals("Cost Center") )
Ok, I will try to see how this format works. Thanks gjeremy!
@gjeremy,
It looks better but not good since it is now giving output of all false. Do you know what I can change here?
String.valueOf("Cost Center".equals(row1.Cost_Center)||"Work Breakdown Center".equals(row1.Cost_Center)||"Network Center".equals(row1.Cost_Center))
The output is to be a valid cost center number or nothing.
as you can see Center is not in the filter so i'll not be in the output
Ok, Thanks, I will look into it today.
@guenneguez jeremy
Thanks gjeremy! 😂 Solved. It was just row1.Cost Center (no space)
Your posts were extremely helpful @guenneguez jeremy