You are not logged in.

Unanswered posts



Important! This site has been replaced. All content here is read-only. Please visit our brand-new community at https://community.talend.com/. We look forward to hearing from you there!



#1 2017-04-05 08:12:24

Cruie
Member
3 posts

Cruie said:

Conditional Column values

I would like to add additional column in Tmap that has value depening on other columns.
If(row2.State =='WA' || row2.State == 'SA') { 'LongDistInc'}
else
{'LocalInc'}  // Current row = new row 'Carrier'
 

Offline

#2 2017-04-07 04:22:54

xdshi
Talend Team


xdshi said:

Re: Conditional Column values

Hi,

You can use ternary operator for if-else scenario in tMap or join your two tables.

Condition?value if true:value if false

If we understand your requirement very well, the expression should be:

row2.State.equals ("WA") || row2.State.equals ("SA")?"LongDistInc":"LocalInc"

Best regards

Sabrina


What we can do is to make sure that Talend will be your best choice!

Offline

Board footer

Talend Contributor Agreement - Talend Website Privacy Policy