<?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 Re: Empty String (Soruce data have the null value) error message when converting String to Decimal format in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Empty-String-Soruce-data-have-the-null-value-error-message-when/m-p/2320569#M90697</link>
    <description>&lt;P&gt;Can anyone assist this ticket , I hope the logics seems to be correct . But still am facing the issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached the screenshot for more reference.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Jan 2021 17:17:17 GMT</pubDate>
    <dc:creator>SMahadevan1608028474</dc:creator>
    <dc:date>2021-01-26T17:17:17Z</dc:date>
    <item>
      <title>Empty String (Soruce data have the null value) error message when converting String to Decimal format</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Empty-String-Soruce-data-have-the-null-value-error-message-when/m-p/2320566#M90694</link>
      <description>&lt;P&gt;Source&lt;/P&gt;&lt;P&gt;-------&lt;/P&gt;&lt;P&gt;Product price &lt;/P&gt;&lt;P&gt;This is column is not mandatory and it have null values also in source data and it's reading the data as String.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Var&lt;/P&gt;&lt;P&gt;----&lt;/P&gt;&lt;P&gt;I have created with var Int datatype.&lt;/P&gt;&lt;P&gt;(int)(Double.parseDouble(row4.Product_price)*10000)&lt;/P&gt;&lt;P&gt;Output table - Set datatype as Double&lt;/P&gt;&lt;P&gt;-------------&lt;/P&gt;&lt;P&gt;Double.parseDouble(String.valueOf(Var.var2))/10000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in Schemacompilance I have selected Nullable checkbox for this column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After run the job since the source file as Null value am getting the below error,&lt;/P&gt;&lt;P&gt;java.lang.NumberFormatException: empty String&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 11:28:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Empty-String-Soruce-data-have-the-null-value-error-message-when/m-p/2320566#M90694</guid>
      <dc:creator>SMahadevan1608028474</dc:creator>
      <dc:date>2021-01-22T11:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Empty String (Soruce data have the null value) error message when converting String to Decimal format</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Empty-String-Soruce-data-have-the-null-value-error-message-when/m-p/2320567#M90695</link>
      <description>&lt;P&gt;You're trying to parse a null or empty string to a double. Do something like this:&lt;/P&gt;&lt;P&gt;(row4.Product_price!=""||row4.Product_price!=null)?(int)(Double.parseDouble(row4.Product_price)*10000):null;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even better, if you've got apache string utils installed I would do this:&lt;/P&gt;&lt;P&gt;Apache_string_utils.isBlank(row4.Product_price)?(int)(Double.parseDouble(row4.Product_price)*10000):null;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;https://www.tutorialspoint.com/java/lang/double_parsedouble.htm&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 15:48:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Empty-String-Soruce-data-have-the-null-value-error-message-when/m-p/2320567#M90695</guid>
      <dc:creator>Peter_Mitchell</dc:creator>
      <dc:date>2021-01-22T15:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: Empty String (Soruce data have the null value) error message when converting String to Decimal format</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Empty-String-Soruce-data-have-the-null-value-error-message-when/m-p/2320568#M90696</link>
      <description>&lt;P&gt;I have tried with this logics, but still facing the same issue "Empty String".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(row4.Product_price!=""||row4.Product_price!=null)?(int)(Double.parseDouble(row4.Product_price)*10000):null&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Additionally this column(Product_price) has the negative value as well (Eg: -608).. I hope this will not make an issue.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 16:33:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Empty-String-Soruce-data-have-the-null-value-error-message-when/m-p/2320568#M90696</guid>
      <dc:creator>SMahadevan1608028474</dc:creator>
      <dc:date>2021-01-22T16:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Empty String (Soruce data have the null value) error message when converting String to Decimal format</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Empty-String-Soruce-data-have-the-null-value-error-message-when/m-p/2320569#M90697</link>
      <description>&lt;P&gt;Can anyone assist this ticket , I hope the logics seems to be correct . But still am facing the issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached the screenshot for more reference.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 17:17:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Empty-String-Soruce-data-have-the-null-value-error-message-when/m-p/2320569#M90697</guid>
      <dc:creator>SMahadevan1608028474</dc:creator>
      <dc:date>2021-01-26T17:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: Empty String (Soruce data have the null value) error message when converting String to Decimal format</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Empty-String-Soruce-data-have-the-null-value-error-message-when/m-p/2320570#M90698</link>
      <description>&lt;P&gt;Did you try .equals(null) or !xxxx.equals(null), I have experienced this to be much better way of comparing nulls&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 23:01:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Empty-String-Soruce-data-have-the-null-value-error-message-when/m-p/2320570#M90698</guid>
      <dc:creator>tnewbie</dc:creator>
      <dc:date>2021-01-26T23:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: Empty String (Soruce data have the null value) error message when converting String to Decimal format</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Empty-String-Soruce-data-have-the-null-value-error-message-when/m-p/2320571#M90699</link>
      <description>&lt;P&gt;I have tried the below ways, but still am facing the Empty String issue.&lt;/P&gt;&lt;P&gt;Can you please let me know is nay mistake here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(row4.Unit_Selling_Price.equals(null)?null:(int)(Double.parseDouble(row4.Unit_Selling_Price)*10000))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(row4.Unit_Selling_Price!=(null)?(int)(Double.parseDouble(row4.Unit_Selling_Price)*10000):null)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(row4.Unit_Selling_Price.equals(null)||row4.Unit_Selling_Price!=(null)?(int)(Double.parseDouble(row4.Unit_Selling_Price)*10000):null)&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 09:13:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Empty-String-Soruce-data-have-the-null-value-error-message-when/m-p/2320571#M90699</guid>
      <dc:creator>SMahadevan1608028474</dc:creator>
      <dc:date>2021-01-27T09:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Empty String (Soruce data have the null value) error message when converting String to Decimal format</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Empty-String-Soruce-data-have-the-null-value-error-message-when/m-p/2320572#M90700</link>
      <description>&lt;P&gt;A null string is not the same as an empty string. If you're going down the route of using .equals() method then you need to include an OR statement. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;((row4.Unit_Selling_Price.equals(null) || row4.Unit_Selling_Price.equals("")) ? null : (int)(Double.parseDouble(row4.Unit_Selling_Price)*10000)).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I said above, I would recommend using apache_string_utils.isBlank() method. Consistently works for me.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 09:29:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Empty-String-Soruce-data-have-the-null-value-error-message-when/m-p/2320572#M90700</guid>
      <dc:creator>Peter_Mitchell</dc:creator>
      <dc:date>2021-01-27T09:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Empty String (Soruce data have the null value) error message when converting String to Decimal format</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Empty-String-Soruce-data-have-the-null-value-error-message-when/m-p/2320573#M90701</link>
      <description>&lt;P&gt;After trying this below statement,&lt;/P&gt;&lt;P&gt;((row4.Unit_Selling_Price.equals(null)||row4.Unit_Selling_Price.equals(""))?null:(int)(Double.parseDouble(row4.Unit_Selling_Price)*10000))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The below error is occurs,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Exception in component tMap_1 (Datavalidation_Filter_V1_3_tconvertype)&lt;/P&gt;&lt;P&gt;&lt;B&gt;java.lang.NullPointerException&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;at datavalidation_jan11.datavalidation_filter_v1_3_tconvertype_0_1.Datavalidation_Filter_V1_3_tconvertype.tFileInputDelimited_1Process(Datavalidation_Filter_V1_3_tconvertype.java:52769)&lt;/P&gt;&lt;P&gt;&amp;nbsp;at datavalidation_jan11.datavalidation_filter_v1_3_tconvertype_0_1.Datavalidation_Filter_V1_3_tconvertype.runJobInTOS(Datavalidation_Filter_V1_3_tconvertype.java:53952)&lt;/P&gt;&lt;P&gt;&amp;nbsp;at datavalidation_jan11.datavalidation_filter_v1_3_tconvertype_0_1.Datavalidation_Filter_V1_3_tconvertype.main(Datavalidation_Filter_V1_3_tconvertype.java:53800)&lt;/P&gt;&lt;P&gt;[statistics] disconnected&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't have apache string utils installed in my system and if I want to do that is the path is right on, please let me where can  I download&lt;/P&gt;&lt;P&gt;&lt;A href="https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/StringUtils.html" alt="https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/StringUtils.html" target="_blank"&gt;https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/StringUtils.html&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 09:49:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Empty-String-Soruce-data-have-the-null-value-error-message-when/m-p/2320573#M90701</guid>
      <dc:creator>SMahadevan1608028474</dc:creator>
      <dc:date>2021-01-27T09:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Empty String (Soruce data have the null value) error message when converting String to Decimal format</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Empty-String-Soruce-data-have-the-null-value-error-message-when/m-p/2320574#M90702</link>
      <description>&lt;P&gt;Please try (row4.Unit_Selling_Price.equals("null")&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 17:01:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Empty-String-Soruce-data-have-the-null-value-error-message-when/m-p/2320574#M90702</guid>
      <dc:creator>tnewbie</dc:creator>
      <dc:date>2021-01-27T17:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Empty String (Soruce data have the null value) error message when converting String to Decimal format</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Empty-String-Soruce-data-have-the-null-value-error-message-when/m-p/2320575#M90703</link>
      <description>&lt;P&gt;I have tried this but still empty string error is occur,&lt;/P&gt;&lt;P&gt;(row4.Unit_Selling_Price.equals("null")?null:(int)(Double.parseDouble(row4.Unit_Selling_Price)*10000))&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 17:16:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Empty-String-Soruce-data-have-the-null-value-error-message-when/m-p/2320575#M90703</guid>
      <dc:creator>SMahadevan1608028474</dc:creator>
      <dc:date>2021-01-27T17:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: Empty String (Soruce data have the null value) error message when converting String to Decimal format</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Empty-String-Soruce-data-have-the-null-value-error-message-when/m-p/2320576#M90704</link>
      <description>&lt;P&gt;Even I have tried with logics but the same error am getting,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am trim the value even it is null and check the  length of the column. Some time if you have any blank spaces it will workout the null condition check.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please correct me if anything wrong here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;((StringHandling.TRIM(row4.Unit_Selling_Price).length()&amp;lt;=0)?null:(int)(Double.parseDouble(row4.Unit_Selling_Price)*10000))&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 12:01:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Empty-String-Soruce-data-have-the-null-value-error-message-when/m-p/2320576#M90704</guid>
      <dc:creator>SMahadevan1608028474</dc:creator>
      <dc:date>2021-01-28T12:01:13Z</dc:date>
    </item>
  </channel>
</rss>

