<?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: Conversion from string to float in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Conversion-from-string-to-float/m-p/2299131#M71515</link>
    <description>Hello 
&lt;BR /&gt;This code should work fine
&lt;BR /&gt;
&lt;PRE&gt;row2.fta_fare_amt==null||row2.fta_fare_amt.equals("")?  Float.parseFloat("0.0")&lt;BR /&gt;: Float.parseFloat(row2.fta_fare_amt)&lt;/PRE&gt;
&lt;BR /&gt;Best regards
&lt;BR /&gt; 
&lt;BR /&gt; shong</description>
    <pubDate>Mon, 17 Aug 2009 04:38:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-08-17T04:38:42Z</dc:date>
    <item>
      <title>Conversion from string to float</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Conversion-from-string-to-float/m-p/2299128#M71512</link>
      <description>Hi,
&lt;BR /&gt;I am getting data in text format (positional format) and want to check if the string is null then assign 0.0 else divide the incoming string by 100
&lt;BR /&gt;trying following expression but getting error "Exception in thread "main" java.lang.Error: Unresolved compilation problems:"
&lt;BR /&gt;row2.fta_fare_amt.equals(null) ? Float.parseFloat("0.0")
&lt;BR /&gt;: Float.parseFloat(row2.fta_fare_amt)
&lt;BR /&gt;Unable to figure out what's the issue, need some help.
&lt;BR /&gt;Thanks,
&lt;BR /&gt;Milind</description>
      <pubDate>Sat, 16 Nov 2024 13:49:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Conversion-from-string-to-float/m-p/2299128#M71512</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion from string to float</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Conversion-from-string-to-float/m-p/2299129#M71513</link>
      <description>Hello Milind
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;row2.fta_fare_amt.equals(null) ? Float.parseFloat("0.0")&lt;BR /&gt;: Float.parseFloat(row2.fta_fare_amt)&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;Change it to 
&lt;BR /&gt;
&lt;PRE&gt;row2.fta_fare_amt==null?  Float.parseFloat("0.0")&lt;BR /&gt;: Float.parseFloat(row2.fta_fare_amt)&lt;/PRE&gt;
&lt;BR /&gt;Best regards
&lt;BR /&gt; 
&lt;BR /&gt; shong</description>
      <pubDate>Mon, 17 Aug 2009 03:08:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Conversion-from-string-to-float/m-p/2299129#M71513</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-08-17T03:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion from string to float</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Conversion-from-string-to-float/m-p/2299130#M71514</link>
      <description>Hi Shong, 
&lt;BR /&gt;Here is the error I am getting after putting the code that you mentioned above 
&lt;BR /&gt;-- 
&lt;BR /&gt;Exception in component tMap_9 
&lt;BR /&gt;java.lang.NumberFormatException: empty String 
&lt;BR /&gt; at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source) 
&lt;BR /&gt; at java.lang.Float.parseFloat(Unknown Source) 
&lt;BR /&gt;-- 
&lt;BR /&gt;where input string is string and output string is float , Do I need to change the datatype ? 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;Milind</description>
      <pubDate>Mon, 17 Aug 2009 04:29:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Conversion-from-string-to-float/m-p/2299130#M71514</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-08-17T04:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion from string to float</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Conversion-from-string-to-float/m-p/2299131#M71515</link>
      <description>Hello 
&lt;BR /&gt;This code should work fine
&lt;BR /&gt;
&lt;PRE&gt;row2.fta_fare_amt==null||row2.fta_fare_amt.equals("")?  Float.parseFloat("0.0")&lt;BR /&gt;: Float.parseFloat(row2.fta_fare_amt)&lt;/PRE&gt;
&lt;BR /&gt;Best regards
&lt;BR /&gt; 
&lt;BR /&gt; shong</description>
      <pubDate>Mon, 17 Aug 2009 04:38:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Conversion-from-string-to-float/m-p/2299131#M71515</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-08-17T04:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion from string to float</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Conversion-from-string-to-float/m-p/2299132#M71516</link>
      <description>Thanks Shong ... still the same error .. there is one more Int column, if following syntax correct, getting complilation error 
&lt;BR /&gt;row2.fta_chk_dgt_tkt_doc_nbr==null||row2.fta_chk_dgt_tkt_doc_nbr("")? Integer.parseInt("0") 
&lt;BR /&gt;: Integer.parseInt(row2.fta_chk_dgt_tkt_doc_nbr) 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;Milind</description>
      <pubDate>Mon, 17 Aug 2009 05:13:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Conversion-from-string-to-float/m-p/2299132#M71516</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-08-17T05:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion from string to float</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Conversion-from-string-to-float/m-p/2299133#M71517</link>
      <description>looks like the error is still for the float
&lt;BR /&gt;Exception in component tMap_9
&lt;BR /&gt;java.lang.NumberFormatException: empty String
&lt;BR /&gt; at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
&lt;BR /&gt; at java.lang.Float.parseFloat(Unknown Source)
&lt;BR /&gt;Thanks,
&lt;BR /&gt;Milind</description>
      <pubDate>Mon, 17 Aug 2009 05:28:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Conversion-from-string-to-float/m-p/2299133#M71517</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-08-17T05:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion from string to float</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Conversion-from-string-to-float/m-p/2299134#M71518</link>
      <description>Hello guy
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;row2.fta_chk_dgt_tkt_doc_nbr==null||row2.fta_chk_dgt_tkt_doc_nbr("")? Integer.parseInt("0")&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;fta_chk_dgt_tkt_doc_nbr("")? ?????!!! please check your code, there is an error in your code.
&lt;BR /&gt;Best regards
&lt;BR /&gt; shong</description>
      <pubDate>Mon, 17 Aug 2009 09:09:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Conversion-from-string-to-float/m-p/2299134#M71518</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-08-17T09:09:36Z</dc:date>
    </item>
  </channel>
</rss>

