<?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 Double datatype, Rounding and Precision problems in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Double-datatype-Rounding-and-Precision-problems/m-p/2300305#M72544</link>
    <description>I have 2 fields in my project that are set as Double 5,2. They're used to store a result from a calculation using rates and minutes. The corresponding fields in the mysql database are set as Double 6,3. Somehow, even though the precision is set to 2 inside the project, there are 3 significant digits being stored in the database. How is it going from 5,2 in the project to 6,3 in the database? Shouldn't it be truncating a digit when it exports?
&lt;BR /&gt;Secondly, if I change to Decimal 6,2 in my tMap component and mysql fields, will it properly store the rounded number? I'm thinking I need to be using 6,3 in the calculations since the rates go out to 3 significant digits (ex. .437). 
&lt;BR /&gt;My goal is to end up with a currency value but using mysql means decimal is my closest option.</description>
    <pubDate>Sat, 16 Nov 2024 13:37:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T13:37:24Z</dc:date>
    <item>
      <title>Double datatype, Rounding and Precision problems</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Double-datatype-Rounding-and-Precision-problems/m-p/2300305#M72544</link>
      <description>I have 2 fields in my project that are set as Double 5,2. They're used to store a result from a calculation using rates and minutes. The corresponding fields in the mysql database are set as Double 6,3. Somehow, even though the precision is set to 2 inside the project, there are 3 significant digits being stored in the database. How is it going from 5,2 in the project to 6,3 in the database? Shouldn't it be truncating a digit when it exports?
&lt;BR /&gt;Secondly, if I change to Decimal 6,2 in my tMap component and mysql fields, will it properly store the rounded number? I'm thinking I need to be using 6,3 in the calculations since the rates go out to 3 significant digits (ex. .437). 
&lt;BR /&gt;My goal is to end up with a currency value but using mysql means decimal is my closest option.</description>
      <pubDate>Sat, 16 Nov 2024 13:37:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Double-datatype-Rounding-and-Precision-problems/m-p/2300305#M72544</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: Double datatype, Rounding and Precision problems</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Double-datatype-Rounding-and-Precision-problems/m-p/2300306#M72545</link>
      <description>I looked a little closer and see that in the mysql mapping file in the preferences that Double is defaulted to 20,10.&lt;BR /&gt;Could it be ignoring my precision and going with the default?  That would explain how the 3 decimal places are making&lt;BR /&gt;it to the database even though my tMap and schema are set at 5,2.</description>
      <pubDate>Tue, 05 Jan 2010 16:04:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Double-datatype-Rounding-and-Precision-problems/m-p/2300306#M72545</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-05T16:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: Double datatype, Rounding and Precision problems</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Double-datatype-Rounding-and-Precision-problems/m-p/2300307#M72546</link>
      <description>Maybe it ignores the specified precision until it's larger than the default one?  In other words, maybe it knows that anything 5,2 will fit into 20,10 so it's not trying to round the decimal places to 2?  &lt;BR /&gt;What would happen if I left it like this and changed the mysql fields to decimal 6,2?  would mysql try to round it or would Talend attempt it first?</description>
      <pubDate>Tue, 05 Jan 2010 16:18:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Double-datatype-Rounding-and-Precision-problems/m-p/2300307#M72546</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-05T16:18:42Z</dc:date>
    </item>
  </channel>
</rss>

