<?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 Use BigDecimal or DecimalType in tSQLRow in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Use-BigDecimal-or-DecimalType-in-tSQLRow/m-p/2250347#M34624</link>
    <description>&lt;P&gt;Hi, I have been trying to get high precision values using tSQLRow in Talend but I can't seem to make it work. Be it any function such as AVG, STDDEV_SAMP, STDDEV_POP or simple Arithmetic operation such as division. I'm unable to get more than 17 precision. I do not wish to use traditional Talend components such as tMap and tAggregate because I have found them to be relatively slower on larger data sets.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Is there any way to perform these tasks using tSQLRow with high precision?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Ex:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Input Values: Value_1: 1457 | Value_2: 7456&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Operation: (1457)/(7456)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Sample tSQLRow query:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;SELECT&lt;/P&gt; 
&lt;P&gt;a.Value_1/a.Value_2 AS OUTPUT1,&lt;/P&gt; 
&lt;P&gt;CAST(a.Value_1/a.Value_2 AS decimal(38,16)) AS OUTPUT2&lt;/P&gt; 
&lt;P&gt;FROM row1 a&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;tSQRow is only able to provide me with 7 precision for the same while tMap gives the entire correct value. i.e.&amp;nbsp;&lt;/P&gt; 
&lt;TABLE&gt; 
 &lt;TBODY&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;&lt;P&gt;0.19541309012875536480686695278969957082&lt;/P&gt;&lt;/TD&gt; 
  &lt;/TR&gt; 
 &lt;/TBODY&gt; 
&lt;/TABLE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Is there any way to increase tSQLRow's accuracy? Am I missing something? Can we use UDFs for the same? If so, how?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Any help is highly appreciated!&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;Talend Big Data Enterprise version 7.1&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 04:08:46 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T04:08:46Z</dc:date>
    <item>
      <title>Use BigDecimal or DecimalType in tSQLRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Use-BigDecimal-or-DecimalType-in-tSQLRow/m-p/2250347#M34624</link>
      <description>&lt;P&gt;Hi, I have been trying to get high precision values using tSQLRow in Talend but I can't seem to make it work. Be it any function such as AVG, STDDEV_SAMP, STDDEV_POP or simple Arithmetic operation such as division. I'm unable to get more than 17 precision. I do not wish to use traditional Talend components such as tMap and tAggregate because I have found them to be relatively slower on larger data sets.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Is there any way to perform these tasks using tSQLRow with high precision?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Ex:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Input Values: Value_1: 1457 | Value_2: 7456&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Operation: (1457)/(7456)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Sample tSQLRow query:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;SELECT&lt;/P&gt; 
&lt;P&gt;a.Value_1/a.Value_2 AS OUTPUT1,&lt;/P&gt; 
&lt;P&gt;CAST(a.Value_1/a.Value_2 AS decimal(38,16)) AS OUTPUT2&lt;/P&gt; 
&lt;P&gt;FROM row1 a&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;tSQRow is only able to provide me with 7 precision for the same while tMap gives the entire correct value. i.e.&amp;nbsp;&lt;/P&gt; 
&lt;TABLE&gt; 
 &lt;TBODY&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;&lt;P&gt;0.19541309012875536480686695278969957082&lt;/P&gt;&lt;/TD&gt; 
  &lt;/TR&gt; 
 &lt;/TBODY&gt; 
&lt;/TABLE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Is there any way to increase tSQLRow's accuracy? Am I missing something? Can we use UDFs for the same? If so, how?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Any help is highly appreciated!&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;Talend Big Data Enterprise version 7.1&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:08:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Use-BigDecimal-or-DecimalType-in-tSQLRow/m-p/2250347#M34624</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T04:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Use BigDecimal or DecimalType in tSQLRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Use-BigDecimal-or-DecimalType-in-tSQLRow/m-p/2250348#M34625</link>
      <description>&lt;P&gt;Hi &lt;BR /&gt;Which DB type are you using? I guess we can't change the SQL API function, need further checking. &lt;BR /&gt;With Java code, we are able to get the expected precision:&lt;BR /&gt;new java.math.BigDecimal(value1)).divide(new java.math.BigDecimal(value2),18,java.math.RoundingMode.CEILING) &lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Shong&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 01:14:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Use-BigDecimal-or-DecimalType-in-tSQLRow/m-p/2250348#M34625</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-30T01:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Use BigDecimal or DecimalType in tSQLRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Use-BigDecimal-or-DecimalType-in-tSQLRow/m-p/2250349#M34626</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;We're using flat files. Unfortunately, Java code isn't an option for us due to the performance impact it has. Isn't there any way to reach 38-39 precision in tSQLRow?</description>
      <pubDate>Sat, 30 Nov 2019 02:34:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Use-BigDecimal-or-DecimalType-in-tSQLRow/m-p/2250349#M34626</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-30T02:34:48Z</dc:date>
    </item>
  </channel>
</rss>

