<?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: Error  Tmap String to float in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Error-Tmap-String-to-float/m-p/2229951#M20734</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You can use the ternary oparator to check the null or empty row before formatting&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try this :&lt;/P&gt;
&lt;P&gt;(&lt;SPAN&gt;row2.QTDE_REC_2&lt;/SPAN&gt; != null &amp;amp;&amp;amp; !&lt;SPAN&gt;row2.QTDE_REC_2&lt;/SPAN&gt;.isEmpty()) ? Float.parseFloat(StringHandling.EREPLACE(StringHandling.EREPLACE(&lt;SPAN&gt;row2.QTDE_REC_2&lt;/SPAN&gt;,"\\.",""),",","\\.")): 0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
    <pubDate>Fri, 06 Sep 2019 10:37:05 GMT</pubDate>
    <dc:creator>guratalgura</dc:creator>
    <dc:date>2019-09-06T10:37:05Z</dc:date>
    <item>
      <title>Error  Tmap String to float</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Error-Tmap-String-to-float/m-p/2229945#M20728</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I'm new at talend and i'm trying to convert string to float and i facing many issues.&lt;/P&gt; 
&lt;P&gt;The tConvertType is not working for me, give me this error&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;FONT&gt;For input string: "1,37"&lt;BR /&gt;For input string: "1,37"&lt;BR /&gt;For input string: "1,37"&lt;BR /&gt;For input string: "1,37"&lt;BR /&gt;For input string: "1,37"&lt;BR /&gt;For input string: "1,37"&lt;BR /&gt;For input string: "0,72"&lt;BR /&gt;For input string: "0,72"&lt;BR /&gt;For input string: "0,72"&lt;BR /&gt;For input string: "0,72"&lt;BR /&gt;For input string: "0,72"&lt;BR /&gt;For input string: "0,72"&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT&gt;For input string: "1.000,72"&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Yes, my input data source is a string with "." and ",".&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Now, i'm trying with the tMap&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;using the expression below : &amp;nbsp;&lt;FONT&gt;Float.parseFloat(StringHandling.EREPLACE(row1.KUS,",","."))&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;but stil not working&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;error&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;FONT&gt;&lt;BR /&gt;Exception in component tMap_2 (Transform_MetaDados)&lt;BR /&gt;java.lang.NumberFormatException: multiple points&lt;BR /&gt;&amp;nbsp;at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1914)&lt;BR /&gt;&amp;nbsp;at sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122)&lt;BR /&gt;&amp;nbsp;at java.lang.Float.parseFloat(Float.java:451)&lt;BR /&gt;&amp;nbsp;at extract_to_oracledb.transform_metadados_0_1.Transform_MetaDados.tDBInput_2Process(Transform_MetaDados.java:1474)&lt;BR /&gt;&amp;nbsp;at extract_to_oracledb.transform_metadados_0_1.Transform_MetaDados.runJobInTOS(Transform_MetaDados.java:2144)&lt;BR /&gt;&amp;nbsp;at extract_to_oracledb.transform_metadados_0_1.Transform_MetaDados.main(Transform_MetaDados.java:1994)&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:46:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Error-Tmap-String-to-float/m-p/2229945#M20728</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T04:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error  Tmap String to float</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Error-Tmap-String-to-float/m-p/2229946#M20729</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd suggest you do this as a series of steps in the tMap Var section:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1/ String in -&amp;gt; remove the dots (1.000,72) -&amp;gt; (1000,72)&lt;/P&gt;
&lt;P&gt;2/ Step 1 String in -&amp;gt; convert the commas to dots (1000,72) -&amp;gt;&amp;nbsp;(1000.72)&lt;/P&gt;
&lt;P&gt;3/ Step 2 String in -&amp;gt; parse string to float.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 12:56:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Error-Tmap-String-to-float/m-p/2229946#M20729</guid>
      <dc:creator>David_Beaty</dc:creator>
      <dc:date>2019-09-05T12:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: Error  Tmap String to float</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Error-Tmap-String-to-float/m-p/2229947#M20730</link>
      <description>How is the better way to remove the dots 
&lt;BR /&gt; 
&lt;BR /&gt;I'm trying this 
&lt;BR /&gt; 
&lt;BR /&gt;StringHandling.EREPLACE(row1.KUS,"."," ") 
&lt;BR /&gt; 
&lt;BR /&gt;Exception in component tMap_4 (Transform_MetaDados) 
&lt;BR /&gt;java.lang.NumberFormatException: empty String 
&lt;BR /&gt;at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1842) 
&lt;BR /&gt;at sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122) 
&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Sep 2019 13:51:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Error-Tmap-String-to-float/m-p/2229947#M20730</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-05T13:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error  Tmap String to float</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Error-Tmap-String-to-float/m-p/2229948#M20731</link>
      <description>&lt;P&gt;&lt;SPAN&gt;hello,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;you can try this:-&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Float.parseFloat(row1.myString)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warm Regards,&lt;BR /&gt;Manish&lt;/P&gt;
&lt;P&gt;Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 14:14:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Error-Tmap-String-to-float/m-p/2229948#M20731</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-05T14:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: Error  Tmap String to float</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Error-Tmap-String-to-float/m-p/2229949#M20732</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try this:&lt;/P&gt;
&lt;P&gt;Float.parseFloat(StringHandling.EREPLACE(StringHandling.EREPLACE(&lt;SPAN&gt;row1.KUS&lt;/SPAN&gt;,"\\.",""),",","\\."))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 14:19:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Error-Tmap-String-to-float/m-p/2229949#M20732</guid>
      <dc:creator>guratalgura</dc:creator>
      <dc:date>2019-09-05T14:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: Error  Tmap String to float</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Error-Tmap-String-to-float/m-p/2229950#M20733</link>
      <description>Perferct! Thanks, this working for me.. 
&lt;BR /&gt; 
&lt;BR /&gt;But in other columns i'm facing another issue, probaly because i have null values. 
&lt;BR /&gt; 
&lt;BR /&gt;i tried this expression 
&lt;BR /&gt; 
&lt;BR /&gt;row2.QTDE_REC_2.equals("null")0:Float.parseFloat(StringHandling.EREPLACE(StringHandling.EREPLACE(row2.QTDE_REC_2 ,"\\.",""),",","\\.")) 
&lt;BR /&gt; 
&lt;BR /&gt;AND RECEIVE THIS ERROR : 
&lt;BR /&gt; 
&lt;BR /&gt;Exception in component tMap_2 (Transform_MetaDados) 
&lt;BR /&gt;java.lang.NullPointerException 
&lt;BR /&gt;at extract_to_oracledb.transform_metadados_0_1.Transform_MetaDados.tDBInput_2Process(Transform_MetaDados.java:2207) 
&lt;BR /&gt;at extract_to_oracledb.transform_metadados_0_1.Transform_MetaDados.runJobInTOS(Transform_MetaDados.java:3032) 
&lt;BR /&gt;at extract_to_oracledb.transform_metadados_0_1.Transform_MetaDados.main(Transform_MetaDados.java:2882) 
&lt;BR /&gt; 
&lt;BR /&gt;Could you suggest something diferent ? 
&lt;BR /&gt; 
&lt;BR /&gt;I'm aprecciente your help 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Sep 2019 18:24:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Error-Tmap-String-to-float/m-p/2229950#M20733</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-05T18:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: Error  Tmap String to float</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Error-Tmap-String-to-float/m-p/2229951#M20734</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You can use the ternary oparator to check the null or empty row before formatting&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try this :&lt;/P&gt;
&lt;P&gt;(&lt;SPAN&gt;row2.QTDE_REC_2&lt;/SPAN&gt; != null &amp;amp;&amp;amp; !&lt;SPAN&gt;row2.QTDE_REC_2&lt;/SPAN&gt;.isEmpty()) ? Float.parseFloat(StringHandling.EREPLACE(StringHandling.EREPLACE(&lt;SPAN&gt;row2.QTDE_REC_2&lt;/SPAN&gt;,"\\.",""),",","\\.")): 0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2019 10:37:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Error-Tmap-String-to-float/m-p/2229951#M20734</guid>
      <dc:creator>guratalgura</dc:creator>
      <dc:date>2019-09-06T10:37:05Z</dc:date>
    </item>
  </channel>
</rss>

