tmap comparable error

Highlighted
Five Stars

tmap comparable error

Hi all,

I'm facing issue in if else condition. 

My condition is if the value from row1.column1="STUD" load "STUD" else all values should be NA.

My input is column is string and output column is string which is in HIVE.

Relational.ISNULL(row1.column1)== true ? "NA": row1.column1

This abovecondition is applied as a variable, and in the target column in where the output needs to be populated

Var.var1="STUD"?"STUD": Var.var1.equalsIgnoreCase("NA").

The above condition need to satisfy for different conditions like"MASTER", "JUNIOR". etc..All these conditions needs to be satisfied in a single output column. So in my output the distinct records will be "STUD","MASTER", "JUNIOR","NA". 

I'm facing comparable error. 

 

Regards,

ss

 

Community Manager

Re: tmap comparable error

You need to think about how you are comparing your values. Looking at your code (which should be erroring by the way because of the "=" operator) you are trying to compare memory rather than values. Take a look at this web page which will explain it thoroughly...

http://www.programmerinterview.com/index.php/java-questions/java-whats-the-difference-between-equals...

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

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

Talend Integration with Databricks

Take a look at this video about Talend Integration with Databricks

Watch Now

How to Modernize Your Cloud Platform for Big Data Analytics With Talend and Micr...

Learn how<SPAN>to modernize your Cloud Platform for Big Data Analytics with Talend and Microsoft Azure</SPAN>

Read