Hi Xdshi,
That works
BUT how would I add more than one if-else to the same tMap?
row1.JobTitle.contains("Sales")?"Sales":row1.JobTitle
row1.JobTitle.contains("
Surgeon")?"
Physician":row1.JobTitle
Thanks
Hi, You can use wildcard in tReplace component, such as:$, *,. Please take a look at component reference :TalendHelpCenter:tReplace with related scenario. What's your job requirement? Could you please set an example for us? Best regards Sabrina
Hi Xdshi,
I have a column that contains Job Titles like: Area Sales Manager, Product Sales or Director of Sales. This is what I would like to do, if this column contains the word sales "sales", I want to replace the entire value such as (Area Sales Manager) to just the word "sales". Can this be done using the tReplace?
Thanks
Hi,
If we understand your requirement very well, you can use tMap to achieve your goal.
Here is ternary if-else operator in tMap.
The expression should be:condition?(value if true): (value if false)
Please take a look at my screenshots for details
Hi Xdshi,
That works
BUT how would I add more than one if-else to the same tMap?
row1.JobTitle.contains("Sales")?"Sales":row1.JobTitle
row1.JobTitle.contains("
Surgeon")?"
Physician":row1.JobTitle
Thanks