
Anonymous
Not applicable
2017-05-19
10:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
tmap update with null value and not equals function
Hello,
I would like to know if it's possible or not to update field with null value in tMap .
I use this :!row1.NOM.equals(row5.NOM) to compare row1(source table) and row2(target table) if I have updated values. It works if I have not null value or empty value but it doesn't work with null or empty value...
Can someone help me how I can figure that with tmap or explain me an other way?
Any help would be really appreciated
Thank you.
Version of Talend :Talend Open Studio for Data IntegrationVersion: 6.3.1
578 Views
1 Solution
Accepted Solutions

Specialist
2017-05-19
11:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You'll have to test for null values before comparing the two values to each other (ex: row1.NOM != null) or else replace null values with empty strings. You can replace nulls using a tMap by changing the output expression for a column from row1.NOM to: row1.NOM == null ? "" : row1.NOM
578 Views
2 Replies

Specialist
2017-05-19
11:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You'll have to test for null values before comparing the two values to each other (ex: row1.NOM != null) or else replace null values with empty strings. You can replace nulls using a tMap by changing the output expression for a column from row1.NOM to: row1.NOM == null ? "" : row1.NOM
579 Views

Anonymous
Not applicable
2017-05-19
11:46 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you cterenzi it works !!!
I put "row1.NOM == null ? "" : row1.NOM" in a variable tmap.
578 Views
