Nesting IF THEN ElSE Logic with columns with same values in tMap String Method

Six Stars

Nesting IF THEN ElSE Logic with columns with same values in tMap String Method

If you had three columns that only have certain values but they only appear once in the three columns. Can you Nest the Three Columns into One Output Column that has True or False Logic in it in this way

 

Column 1 + Column 2 + Column 3.equals("Do Not Call")?"True" : "False"

 

or would you have to seperate each IF THEN ELSE Statement for each column with ":"

 

Column 1.equals("Do Not Call")?"True" : "False" : Column 2.equals("Do Not Call")?"True" : "False" : Column 3.equals("Do Not Call")?"True" : "False"

Was just curious what the proper syntax is for this specific Logic

 

Let me know

 

Thanks,

 

Andrew

 

 

Thirteen Stars

Re: Nesting IF THEN ElSE Logic with columns with same values in tMap String Method

Hi,

 

if I understand correct the logic, it is:

 

Column 1.equals("Do Not Call")&&Column 2.equals("Do Not Call")&&Column 3.equals("Do Not Call")?"True":"False"
-----------

Cloud Free Trial

Try Talend Cloud free for 30 days.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.