<?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: Tmap BigDecimal Divide operation in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Tmap-BigDecimal-Divide-operation/m-p/2334956#M103567</link>
    <description>&lt;P&gt;I found what was wrong in addition to your solution with the correct formula.&lt;/P&gt; 
&lt;P&gt;In the tmap component I add the precision to 2 digits, so now it works&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="solution.png" style="width: 945px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M4o3.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145848iD0B0EC76135255BA/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M4o3.png" alt="0683p000009M4o3.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Tanks for help&lt;/P&gt;</description>
    <pubDate>Mon, 27 May 2019 21:23:12 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-05-27T21:23:12Z</dc:date>
    <item>
      <title>Tmap BigDecimal Divide operation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Tmap-BigDecimal-Divide-operation/m-p/2334948#M103559</link>
      <description>&lt;P&gt;Hello, I have a problem with a divide operation in tmap component.&lt;/P&gt;
&lt;P&gt;I would like a result with 2 decimal and I always obtain a number without decimal.&lt;/P&gt;
&lt;P&gt;Here si my formula :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(row1.T8_PRIXV6 == null ? new BigDecimal("0") : row1.T8_PRIXV6).divide(new BigDecimal("1.2"),2)&lt;/P&gt;
&lt;P&gt;The source and the destination are BigDecimal.&lt;/P&gt;
&lt;P&gt;Tanks for help&lt;/P&gt;</description>
      <pubDate>Sun, 26 May 2019 16:38:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Tmap-BigDecimal-Divide-operation/m-p/2334948#M103559</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-26T16:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Tmap BigDecimal Divide operation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Tmap-BigDecimal-Divide-operation/m-p/2334949#M103560</link>
      <description>&lt;P&gt;Form Java API, second parameter is rounding mode, not scale, scale is same a "this" (0, if null for your example).&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;public BigDecimal divide(BigDecimal divisor,
                int roundingMode)

Returns a BigDecimal whose value is (this / divisor), and whose scale is this.scale(). If rounding must be performed to generate a result with the given scale, the specified rounding mode is applied.

The new divide(BigDecimal, RoundingMode) method should be used in preference to this legacy method.

Parameters:
    divisor - value by which this BigDecimal is to be divided.
    roundingMode - rounding mode to apply.&lt;/PRE&gt;</description>
      <pubDate>Sun, 26 May 2019 17:19:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Tmap-BigDecimal-Divide-operation/m-p/2334949#M103560</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-26T17:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Tmap BigDecimal Divide operation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Tmap-BigDecimal-Divide-operation/m-p/2334950#M103561</link>
      <description>I tried to add the rounding mode :
&lt;BR /&gt;
&lt;BR /&gt;(row1.T8_PRIXV6 == null ? new BigDecimal("0") : row1.T8_PRIXV6).divide(new BigDecimal("1.2"),3, BigDecimal.ROUND_CEILING)
&lt;BR /&gt;
&lt;BR /&gt;But the result is still the same.
&lt;BR /&gt;</description>
      <pubDate>Sun, 26 May 2019 20:04:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Tmap-BigDecimal-Divide-operation/m-p/2334950#M103561</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-26T20:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Tmap BigDecimal Divide operation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Tmap-BigDecimal-Divide-operation/m-p/2334951#M103562</link>
      <description>&lt;P&gt;That's normal, you are using a rounding mode, not a scaling choice.&lt;/P&gt; 
&lt;P&gt;Re-read the API, use this instead :&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;public BigDecimal divide(BigDecimal divisor,
                &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;int scale,&lt;/STRONG&gt;&lt;/FONT&gt;
                RoundingMode roundingMode)

Returns a BigDecimal whose value is (this / divisor), and whose scale is as specified. If rounding must be performed to generate a result with the specified scale, the specified rounding mode is applied.

Parameters:
    divisor - value by which this BigDecimal is to be divided.
    &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;scale - scale of the BigDecimal quotient to be returned.&lt;/FONT&gt;&lt;/STRONG&gt;
    roundingMode - rounding mode to apply.&lt;/PRE&gt; 
&lt;P&gt;and not&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;public BigDecimal divide(BigDecimal divisor,
                &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;int roundingMode&lt;/STRONG&gt;&lt;/FONT&gt;)

Returns a BigDecimal whose value is (this / divisor), and whose scale is this.scale(). If rounding must be performed to generate a result with the given scale, the specified rounding mode is applied.

The new divide(BigDecimal, RoundingMode) method should be used in preference to this legacy method.

Parameters:
    divisor - value by which this BigDecimal is to be divided.
    &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;roundingMode - rounding mode to apply.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 26 May 2019 20:22:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Tmap-BigDecimal-Divide-operation/m-p/2334951#M103562</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-26T20:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: Tmap BigDecimal Divide operation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Tmap-BigDecimal-Divide-operation/m-p/2334952#M103563</link>
      <description>&lt;P&gt;Here is the new Fomula I tried :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;(row1.T8_PRIXV6 == null ? new BigDecimal("0") : row1.T8_PRIXV6).divide(new BigDecimal("1.2"),3, RoundingMode.CEILING)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I also tried :&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;(row1.T8_PRIXV6 == null ? new BigDecimal("0") : row1.T8_PRIXV6).divide(new BigDecimal("1.2"),3, java.math.RoundingMode.CEILING)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I get an error : RoundingMode cannot be resolve to a variable.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Tanks for help&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 May 2019 21:30:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Tmap-BigDecimal-Divide-operation/m-p/2334952#M103563</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-26T21:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: Tmap BigDecimal Divide operation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Tmap-BigDecimal-Divide-operation/m-p/2334953#M103564</link>
      <description>&lt;P&gt;Can you put a screenshot. Second solution should work for Java &amp;gt;= 1.5 (see attached).&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LvOW"&gt;2019-05-27 09_23_57-Talend Open Studio for Data Integration (7.1.1.20181026_1147) _ GettingStarted (.png&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Lvc3"&gt;2019-05-27 09_24_09-Talend Open Studio for Data Integration (7.1.1.20181026_1147) _ GettingStarted (.png&lt;/A&gt;</description>
      <pubDate>Mon, 27 May 2019 08:24:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Tmap-BigDecimal-Divide-operation/m-p/2334953#M103564</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-27T08:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: Tmap BigDecimal Divide operation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Tmap-BigDecimal-Divide-operation/m-p/2334954#M103565</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Here are the screenshot :&lt;/P&gt; 
&lt;P&gt;The formula :&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="formule.png" style="width: 945px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M5Ba.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/129236i3D56948700EA52AA/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M5Ba.png" alt="0683p000009M5Ba.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Here is the error :&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="erreur.png" style="width: 945px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M5Bf.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/143108i475E4684178C38E4/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M5Bf.png" alt="0683p000009M5Bf.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;The error occured when I added the RoundingMode.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Tanks&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2019 20:22:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Tmap-BigDecimal-Divide-operation/m-p/2334954#M103565</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-27T20:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: Tmap BigDecimal Divide operation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Tmap-BigDecimal-Divide-operation/m-p/2334955#M103566</link>
      <description>&lt;P&gt;I also tried the java component, here si the result :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DÈmarrage du job Testjava a 22:10 27/05/2019.&lt;BR /&gt;[statistics] connecting to socket on port 3864&lt;BR /&gt;[statistics] connected&lt;BR /&gt;#### =&amp;gt; 37.500&lt;BR /&gt;[statistics] disconnected&lt;/P&gt;&lt;P&gt;Job Testjava terminÈ ‡ 22:10 27/05/2019. [Code sortie=0]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result is correct&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2019 21:11:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Tmap-BigDecimal-Divide-operation/m-p/2334955#M103566</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-27T21:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: Tmap BigDecimal Divide operation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Tmap-BigDecimal-Divide-operation/m-p/2334956#M103567</link>
      <description>&lt;P&gt;I found what was wrong in addition to your solution with the correct formula.&lt;/P&gt; 
&lt;P&gt;In the tmap component I add the precision to 2 digits, so now it works&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="solution.png" style="width: 945px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M4o3.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145848iD0B0EC76135255BA/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M4o3.png" alt="0683p000009M4o3.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Tanks for help&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2019 21:23:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Tmap-BigDecimal-Divide-operation/m-p/2334956#M103567</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-27T21:23:12Z</dc:date>
    </item>
  </channel>
</rss>

