<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Tmap expression causing null error message in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Tmap-expression-causing-null-error-message/m-p/2310173#M81321</link>
    <description>&lt;P&gt;I have a source table which has nulls in the fields listed below and lookup table also has null values.&lt;/P&gt;&lt;P&gt;I am using an output filter which is causing the following error message.&amp;nbsp; How do you fix this issue?&lt;/P&gt;&lt;P&gt;Exception in component tMSSqlInput_7 (PTLoadSateliteJob)&lt;BR /&gt;java.lang.RuntimeException: Null value in non-Nullable column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the filter I'm using.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Name column is String&lt;/P&gt;&lt;P&gt;CTypeId is Integer&lt;/P&gt;&lt;P&gt;StypeId is Integer&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;OpportunityId is Boolan&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;StartDate is Datetime&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(!(row1.Name).equals(row2.Name) ||&lt;BR /&gt;row1.CTypeId != row2.CTypeId ||&lt;BR /&gt;row1.STypeId != row2.STypeId ||&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;row1.OpportunityId != row2.OpportunityId ||&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;row1.StartDate != row2.StartDate)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Jun 2018 21:55:43 GMT</pubDate>
    <dc:creator>rp2018</dc:creator>
    <dc:date>2018-06-22T21:55:43Z</dc:date>
    <item>
      <title>Tmap expression causing null error message</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Tmap-expression-causing-null-error-message/m-p/2310173#M81321</link>
      <description>&lt;P&gt;I have a source table which has nulls in the fields listed below and lookup table also has null values.&lt;/P&gt;&lt;P&gt;I am using an output filter which is causing the following error message.&amp;nbsp; How do you fix this issue?&lt;/P&gt;&lt;P&gt;Exception in component tMSSqlInput_7 (PTLoadSateliteJob)&lt;BR /&gt;java.lang.RuntimeException: Null value in non-Nullable column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the filter I'm using.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Name column is String&lt;/P&gt;&lt;P&gt;CTypeId is Integer&lt;/P&gt;&lt;P&gt;StypeId is Integer&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;OpportunityId is Boolan&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;StartDate is Datetime&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(!(row1.Name).equals(row2.Name) ||&lt;BR /&gt;row1.CTypeId != row2.CTypeId ||&lt;BR /&gt;row1.STypeId != row2.STypeId ||&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;row1.OpportunityId != row2.OpportunityId ||&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;row1.StartDate != row2.StartDate)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 21:55:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Tmap-expression-causing-null-error-message/m-p/2310173#M81321</guid>
      <dc:creator>rp2018</dc:creator>
      <dc:date>2018-06-22T21:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Tmap expression causing null error message</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Tmap-expression-causing-null-error-message/m-p/2310174#M81322</link>
      <description>&lt;P&gt;This is why knowing Java is REALLY useful. Your issue is caused by the fact that an object that is null has no methods (like equals) available. Consider it as not existing. For example, you can say someone is a waste of space, but not a waste of null &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The way to get round this is to check for null first. For example....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;row1.myValue!=null &amp;amp;&amp;amp; row1.myValue.equals("hello")&lt;/PRE&gt;&lt;P&gt;The first thing that happens is that myValue is checked for null. If it is NOT null, then the next part is checked. As we know myValue is not null, it will definitely have the ability to use the "equals" method.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 22:31:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Tmap-expression-causing-null-error-message/m-p/2310174#M81322</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-22T22:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: Tmap expression causing null error message</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Tmap-expression-causing-null-error-message/m-p/2310175#M81323</link>
      <description>&lt;P&gt;I have a record with&amp;nbsp;field&amp;nbsp;name from source and lookup both have null value.&amp;nbsp; How do we compare this?&lt;/P&gt;&lt;P&gt;source incoming might change the value to a non null value in future, but for the first run I need to compare null to null.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;meaning row1.name(null value) &amp;lt;&amp;gt; row2.name(null value)&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jun 2018 00:14:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Tmap-expression-causing-null-error-message/m-p/2310175#M81323</guid>
      <dc:creator>rp2018</dc:creator>
      <dc:date>2018-06-23T00:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: Tmap expression causing null error message</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Tmap-expression-causing-null-error-message/m-p/2310176#M81324</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;
&lt;P&gt;In tmap expression filter use and condition for main flow and the lookup so that the null values from the data are eliminated&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;row1.name!=null &amp;amp;&amp;amp; row2.name!=null&lt;/P&gt;
&lt;P&gt;where row1 is the main connection and row2 is the lookup connecting to tmap&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try and let me know&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Don't forget to give kudos when a reply is helpful and click Accept the solution when you think&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jun 2018 13:27:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Tmap-expression-causing-null-error-message/m-p/2310176#M81324</guid>
      <dc:creator>krengan21</dc:creator>
      <dc:date>2018-06-23T13:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: Tmap expression causing null error message</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Tmap-expression-causing-null-error-message/m-p/2310177#M81325</link>
      <description>&lt;P&gt;It sounds like you need something to future proof your code for when you do get values. I have a routine method I put together which should cover your requirements. It does a little more and compares Strings irrespective of case (you may want to change compareToIgnoreCase with equals), but it also handles comparing nulls. Take a look....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;    public static boolean valuesMatchAcceptNulls(String data1, String data2){
    	boolean returnVal = false;
    	
    	if(data1!=null &amp;amp;&amp;amp; data2!=null){
    		if(data1.compareToIgnoreCase(data2)==0){
    			returnVal = true;
    		}
    	}else if(data1==null &amp;amp;&amp;amp; data2==null){
    		returnVal = true;
    	}
    	return returnVal;
    }&lt;/PRE&gt; 
&lt;P&gt;Create a routine (or add this to an existing routine) and use it in your tMap.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2018 09:32:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Tmap-expression-causing-null-error-message/m-p/2310177#M81325</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-25T09:32:32Z</dc:date>
    </item>
  </channel>
</rss>

