Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to implement if - if else structure in Talend

How can I implement if, if - else structure in Talend without using tJava component?
For example how can I implement this code snippet with talend components? 
if(condition1)
    statements1
else if(condition2)
    statements2
else if(condition3)
...
Labels (3)
4 Replies
Anonymous
Not applicable
Author

Hi, 


Here is ternary if-else operator in tMap. 
The expression is Condition?value if true: value if false.
Please take a look at a related forum:https://community.talend.com/t5/Design-and-Development/resolved-tMap-Conditions-Problems-conversion/...
 
 
Best regards
Sabrina
Anonymous
Not applicable
Author

this post also helped
Anonymous
Not applicable
Author

so the answer is to do it like that in tMap expression editor:
(condition1) ? statement1 : (condition2) ? : statement2 : (condition3) ? ...
Anonymous
Not applicable
Author

Hi,
Could you please elaborate your case with an example with input and expected output values? In this way, we can set this  if-else operator   expression in tMap for you.
Best regards
Sabrina