<?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: [resolved] Big Data - BigDecimal math operation (division) in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Big-Data-BigDecimal-math-operation-division/m-p/2240335#M27863</link>
    <description>Figured out the solution.
&lt;BR /&gt;(row1.amount).divide(new BigDecimal(Var.nodays), java.math.RoundingMode.HALF_UP)&amp;nbsp;
&lt;BR /&gt;Solution reference: couldn't post URL as I do not meet the minimum posting requirements.
&lt;BR /&gt;
&lt;B&gt;Kudos to&lt;/B&gt;:&amp;nbsp;
&lt;B&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&lt;A href="https://www.talendforge.org/forum/profile.php?id=5251" target="_blank" rel="nofollow noopener noreferrer"&gt;lijolawrance&lt;/A&gt;&amp;nbsp;posted solution on 2011-05-13 11:24:06 Viewtopic id#&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;
&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&lt;FONT size="2"&gt;&lt;B&gt;15684&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;Now it works!</description>
    <pubDate>Thu, 10 Dec 2015 01:43:40 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-12-10T01:43:40Z</dc:date>
    <item>
      <title>[resolved] Big Data - BigDecimal math operation (division)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Big-Data-BigDecimal-math-operation-division/m-p/2240333#M27861</link>
      <description>Hi, 
&lt;BR /&gt;I am trying to divide a bigdecimal number with an integer. I tried to convert the integer (denominator) to bigdecimal and double and ran into issues. What is the right approach in doing math operations between a bigdecimal (numerator) and an integer or long (denominator). 
&lt;BR /&gt;For example: in my tMap I tried the following and getting error for all. 
&lt;BR /&gt;I want to do the following arithmetic: amount/nodays (where amount = BigDecimal type, Var.nodays = integer type) 
&lt;BR /&gt;(row1.amount).divide(new BigDecimal(Integer.toString(Var.nodays)))&amp;nbsp; 
&lt;BR /&gt;Error: Rounding mode cannot be resolved to a variable 
&lt;BR /&gt;(row1.campaign_budget).divide(Double.valueOf(Var.nodays))&amp;nbsp; 
&lt;BR /&gt;Error: Exception in thread "main" java.lang.Error: Unresolved compilation problems:&amp;nbsp; 
&lt;BR /&gt;RoundingMode cannot be resolved to a variable 
&lt;BR /&gt;The method divide(BigDecimal) in the type BigDecimal is not applicable for the arguments (Double) 
&lt;BR /&gt;at&amp;nbsp; 
&lt;BR /&gt;(row1.amount).divide(new BigDecimal(Integer.toString(Var.nodays)), 10, RoundingMode.CEILING)&amp;nbsp; 
&lt;BR /&gt;Error: 
&lt;BR /&gt;Exception in thread "main" java.lang.Error: Unresolved compilation problems:&amp;nbsp; 
&lt;BR /&gt;RoundingMode cannot be resolved to a variable</description>
      <pubDate>Sat, 16 Nov 2024 10:55:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Big-Data-BigDecimal-math-operation-division/m-p/2240333#M27861</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T10:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Big Data - BigDecimal math operation (division)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Big-Data-BigDecimal-math-operation-division/m-p/2240334#M27862</link>
      <description>Anyone? Would highly appreciate help with the BigDecimal math (division) issue.&lt;BR /&gt;Thanks,&lt;BR /&gt;ShaunK</description>
      <pubDate>Wed, 09 Dec 2015 18:27:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Big-Data-BigDecimal-math-operation-division/m-p/2240334#M27862</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-09T18:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Big Data - BigDecimal math operation (division)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Big-Data-BigDecimal-math-operation-division/m-p/2240335#M27863</link>
      <description>Figured out the solution.
&lt;BR /&gt;(row1.amount).divide(new BigDecimal(Var.nodays), java.math.RoundingMode.HALF_UP)&amp;nbsp;
&lt;BR /&gt;Solution reference: couldn't post URL as I do not meet the minimum posting requirements.
&lt;BR /&gt;
&lt;B&gt;Kudos to&lt;/B&gt;:&amp;nbsp;
&lt;B&gt;&lt;FONT size="2"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&lt;A href="https://www.talendforge.org/forum/profile.php?id=5251" target="_blank" rel="nofollow noopener noreferrer"&gt;lijolawrance&lt;/A&gt;&amp;nbsp;posted solution on 2011-05-13 11:24:06 Viewtopic id#&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;
&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&lt;FONT size="2"&gt;&lt;B&gt;15684&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;Now it works!</description>
      <pubDate>Thu, 10 Dec 2015 01:43:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Big-Data-BigDecimal-math-operation-division/m-p/2240335#M27863</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-10T01:43:40Z</dc:date>
    </item>
  </channel>
</rss>

