Could help me explain the difference between
row2.state.equals('Arizona') vs 'Arizona'.equals(row2.state)
in expresssion under tjoin inner join tab.
Solved! Go to Solution.
As TRF said, you should NEVER use the first one.
The second create a static String object, which prevent any exception, so you can do many operations like : !"".equals(row1.data)
The first syntax is a bad syntax and should be banned from all Java code you can ever find
You can use that trick in many situations if you're not sure of the nullability of your String.
Example : row1.data+"" will never be null, even if "data" is an Integer
Actually i was using this Arizona'.equals(row2.state) in tmap to only select rows with Arizona.
TMSSQLinput - tmap - MSSQLoupt
tmssqlinput (Lookup) - above tmap
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Part 2 of a series on Context Variables
Learn how to do cool things with Context Variables
Find out how to migrate from one database to another using the Dynamic schema