how to implement if - if else structure in Talend

Highlighted
Six Stars

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)
...
Moderator

Re: how to implement if - if else structure in Talend

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://www.talendforge.org/forum/viewtopic.php?id=37034
 
 
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Six Stars

Re: how to implement if - if else structure in Talend

this post also helped
Six Stars

Re: how to implement if - if else structure in Talend

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

Re: how to implement if - if else structure in Talend

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
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

An API-First Approach to Modernizing Applications

Learn how to use an API-First Approach to Modernize your Applications

Watch Now

Talend API Designer – Technical Overview

Take a look at this technical overview video of Talend API Designer

Watch Now

Getting Started with APIs

Find out how to get started with APIs

Read