tMap - How do you code a NOT EQUAL on a string type column?

Six Stars

tMap - How do you code a NOT EQUAL on a string type column?

I'm still new to Talend Open Studio For Data Integration and have a question on the tMap Expression Builder:
I have a column called row1.Entity_Type_Code which is defined as a string type.
I would like to select rows where the column row1.Entity_Type_Code is NOT Equal to 1.
I've tried:
row1.Entity_Type_Code!="1"
row1.Entity_Type_Code.notequals("1")
How do you code a NOT EQUAL on a string column?
Thanks
Seventeen Stars

Re: tMap - How do you code a NOT EQUAL on a string type column?

("1".equals(row1.Entity_Type) == false)

This way your code also not fail if the value is null.
Highlighted
Six Stars

Re: tMap - How do you code a NOT EQUAL on a string type column?

Thanks jlolling that worked!
Perhaps you can help me with this problem:
I have a CVS file with a column that contains a persons full name in all uppercase i.e. STEVE CHARLES SMITH
I would like to edit this column to leave the first letter of each word in uppercase and lowercase the remaining letters of each word so the results look like this: Steve Charles Smith
I tried using the following code in tMap but it only uppercase's the first letter of the first word and the remaining letters are all in lowercase i.e. Steve charles smith
Current Code:
row1.Full_Name.toLowerCase().replaceFirst("",

row1.Full_Name.substring(0,1).toUpperCase())
Does you know how to make the results look like Steve Charles Smith?
Thanks for your time.

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

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Download