<?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: Novice problem with Talend and BigDecimal in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Novice-problem-with-Talend-and-BigDecimal/m-p/2317277#M87736</link>
    <description>A last update (and closing the issue) 
&lt;BR /&gt;This morning I have tried opening the CSV with a text editor and not with Excel (sigh) and the data are correct. 
&lt;BR /&gt;So it is a matter of visualization in Excel... 
&lt;BR /&gt;sorry for non checking it before &lt;span class="lia-unicode-emoji" title=":neutral_face:"&gt;😐&lt;/span&gt; 
&lt;BR /&gt;Ciao</description>
    <pubDate>Fri, 10 Feb 2012 08:42:33 GMT</pubDate>
    <dc:creator>_AnonymousUser</dc:creator>
    <dc:date>2012-02-10T08:42:33Z</dc:date>
    <item>
      <title>Novice problem with Talend and BigDecimal</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Novice-problem-with-Talend-and-BigDecimal/m-p/2317275#M87734</link>
      <description>Hello,
&lt;BR /&gt;I hope the following is not a FAQ.
&lt;BR /&gt;I have a problem using BigDecimal (and tMap)
&lt;BR /&gt;Practically, I have the main flow "row9" containing 2 BIGDECIMAL columns CLOTHUSAGE and SUMQTY and I need to print in a CSV file an AVG which basically is CLOTHUSAGE/(SUMQTY*10000)
&lt;BR /&gt;
&lt;BR /&gt;btw If I extract their values they are correct..
&lt;BR /&gt;CLOTHUSAGE SUMQTY
&lt;BR /&gt;275021 42
&lt;BR /&gt;445140 40
&lt;BR /&gt;607115 220
&lt;BR /&gt;745800 60
&lt;BR /&gt;7047275 1300
&lt;BR /&gt;I am using a tMap in order to add a column AVG to my main output flow
&lt;BR /&gt;The problem is the following 
&lt;BR /&gt;If I divide one for the other with the following formula
&lt;BR /&gt;(row9.CLOTHUSAGE != null &amp;amp;&amp;amp; row9.SUMQTY != null)? row9.CLOTHUSAGE.divide(row9.SUMQTY, 0, BigDecimal.ROUND_FLOOR):new BigDecimal(0) 
&lt;BR /&gt; 
&lt;BR /&gt;the results in the CSV are correct
&lt;BR /&gt;CLOTHUSAGE SUMQTY AVG
&lt;BR /&gt;275021 42 6548
&lt;BR /&gt;445140 40 11128
&lt;BR /&gt;607115 220 2759
&lt;BR /&gt;745800 60 12430
&lt;BR /&gt;7047275 1300 5420
&lt;BR /&gt;But as I said I would need these numbers in a CSV in another scale (/10000) as the following 
&lt;BR /&gt;0.6548
&lt;BR /&gt;1.1128
&lt;BR /&gt;0.2759
&lt;BR /&gt;1.2430
&lt;BR /&gt;0.5420
&lt;BR /&gt;So I have tried to set the target column of the tMap output flow as the following
&lt;BR /&gt;(row9.CLOTHUSAGE != null &amp;amp;&amp;amp; row9.SUMQTY != null)? row9.CLOTHUSAGE.divide(row9.SUMQTY.multiply(new BigDecimal(10000)), 5, BigDecimal.ROUND_FLOOR):new BigDecimal(0) 
&lt;BR /&gt; 
&lt;BR /&gt;And here is the strange thing
&lt;BR /&gt;I obtain the following unexpected (at least for me) result
&lt;BR /&gt;0.65481
&lt;BR /&gt;111.285 (KO)
&lt;BR /&gt;0.27596
&lt;BR /&gt;124.300 (KO)
&lt;BR /&gt;0.54209
&lt;BR /&gt;What am I doing wrong?
&lt;BR /&gt;Thanks in advance for any suggestion</description>
      <pubDate>Sat, 16 Nov 2024 12:23:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Novice-problem-with-Talend-and-BigDecimal/m-p/2317275#M87734</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2024-11-16T12:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: Novice problem with Talend and BigDecimal</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Novice-problem-with-Talend-and-BigDecimal/m-p/2317276#M87735</link>
      <description>An update...
&lt;BR /&gt;putting a tLogRow the data I see in the console are correct, so the problem seems to be in the way I use the tFileOutputDelimited Component
&lt;BR /&gt;VindalooMan</description>
      <pubDate>Thu, 09 Feb 2012 17:27:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Novice-problem-with-Talend-and-BigDecimal/m-p/2317276#M87735</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2012-02-09T17:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: Novice problem with Talend and BigDecimal</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Novice-problem-with-Talend-and-BigDecimal/m-p/2317277#M87736</link>
      <description>A last update (and closing the issue) 
&lt;BR /&gt;This morning I have tried opening the CSV with a text editor and not with Excel (sigh) and the data are correct. 
&lt;BR /&gt;So it is a matter of visualization in Excel... 
&lt;BR /&gt;sorry for non checking it before &lt;span class="lia-unicode-emoji" title=":neutral_face:"&gt;😐&lt;/span&gt; 
&lt;BR /&gt;Ciao</description>
      <pubDate>Fri, 10 Feb 2012 08:42:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Novice-problem-with-Talend-and-BigDecimal/m-p/2317277#M87736</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2012-02-10T08:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: Novice problem with Talend and BigDecimal</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Novice-problem-with-Talend-and-BigDecimal/m-p/2317278#M87737</link>
      <description>Hello,&lt;BR /&gt;I reproduced your job and it works. The good values are contained in the tFileOutputDelimited component&lt;BR /&gt;i use TOS v4.02.r43696&lt;BR /&gt;Regards</description>
      <pubDate>Fri, 10 Feb 2012 08:55:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Novice-problem-with-Talend-and-BigDecimal/m-p/2317278#M87737</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-02-10T08:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Novice problem with Talend and BigDecimal</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Novice-problem-with-Talend-and-BigDecimal/m-p/2317279#M87738</link>
      <description>hi 
&lt;BR /&gt;Can we compare BigDecimal value with null ,i tried using row1.col==null?0:row1.col 
&lt;BR /&gt;but getting the following error in tmap 
&lt;BR /&gt;Type mismatch:cannot convert from number and comparable&amp;lt;?&amp;gt;to BigDecimal 
&lt;BR /&gt; 
&lt;BR /&gt;how to compare it with null value</description>
      <pubDate>Wed, 14 Aug 2013 08:39:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Novice-problem-with-Talend-and-BigDecimal/m-p/2317279#M87738</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2013-08-14T08:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: Novice problem with Talend and BigDecimal</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Novice-problem-with-Talend-and-BigDecimal/m-p/2317280#M87739</link>
      <description>0 is an int so you can't assign it to a BigDecimal column.  Use row1.col==null?BigDecimal.ZERO:row1.col.</description>
      <pubDate>Thu, 15 Aug 2013 06:11:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Novice-problem-with-Talend-and-BigDecimal/m-p/2317280#M87739</guid>
      <dc:creator>alevy</dc:creator>
      <dc:date>2013-08-15T06:11:25Z</dc:date>
    </item>
  </channel>
</rss>

