<?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: scientific notation being written out in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/scientific-notation-being-written-out/m-p/2207675#M7213</link>
    <description>jlolling, can you explain when you say the value maybe not be exactly zero, what you mean. 
&lt;BR /&gt;. 
&lt;BR /&gt;So I ran a simple test, where I use the following select statement 
&lt;BR /&gt; 
&lt;BR /&gt;select 0.00000000, 0.0000000, 0.000000, 0.00000, 0.0000, 0.000, 0.00, 0 
&lt;BR /&gt; 
&lt;BR /&gt;and a schema that matches, ie. 
&lt;BR /&gt;field1 BigDecimal 28 8 
&lt;BR /&gt;field2 BigDecimal 28 7 
&lt;BR /&gt;field3 BigDecimal 28 6 
&lt;BR /&gt;field4 BigDecimal 28 5 
&lt;BR /&gt;field5 BigDecimal 28 4 
&lt;BR /&gt;field6 BigDecimal 28 3 
&lt;BR /&gt;field7 BigDecimal 28 2 
&lt;BR /&gt;field8 BigDecimal 28 0 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;As you can see from the results below it looks like any field with a scale of more than 6 with 0 results in scientific notation representation when you convert to string. 
&lt;BR /&gt;If you have data it does not use scientific notation? see second result set below. 
&lt;BR /&gt; 
&lt;BR /&gt;Can anyone confirm that this is expected behavior for Talend or Java? 
&lt;BR /&gt;And can anyone comeup with away around this? 
&lt;BR /&gt; 
&lt;BR /&gt;.------+------+--------+-------+------+------+------+------. 
&lt;BR /&gt;| tLogRow_4 | 
&lt;BR /&gt;|=-----+------+--------+-------+------+------+------+-----=| 
&lt;BR /&gt;|field1|field2|field3 |field4 |field5|field6|field7|field8| 
&lt;BR /&gt;|=-----+------+--------+-------+------+------+------+-----=| 
&lt;BR /&gt;|0E-8 |0E-7 |0.000000|0.00000|0.0000|0.000 |0.00 |0 | 
&lt;BR /&gt;'------+------+--------+-------+------+------+------+------' 
&lt;BR /&gt; 
&lt;BR /&gt;Second result set 
&lt;BR /&gt;----------+------+--------+-------+------+------+------+------. 
&lt;BR /&gt;| tLogRow_4 | 
&lt;BR /&gt;|=---------+------+--------+-------+------+------+------+-----=| 
&lt;BR /&gt;|field1 |field2|field3 |field4 |field5|field6|field7|field8| 
&lt;BR /&gt;|=---------+------+--------+-------+------+------+------+-----=| 
&lt;BR /&gt;|0.12345678|0E-7 |0.000000|0.00000|0.0000|0.000 |0.00 |0 | 
&lt;BR /&gt;'----------+------+--------+-------+------+------+------+------'</description>
    <pubDate>Sun, 05 Jan 2014 19:59:41 GMT</pubDate>
    <dc:creator>_AnonymousUser</dc:creator>
    <dc:date>2014-01-05T19:59:41Z</dc:date>
    <item>
      <title>scientific notation being written out</title>
      <link>https://community.qlik.com/t5/Talend-Studio/scientific-notation-being-written-out/m-p/2207673#M7211</link>
      <description>I am having issues with data been shown in scientific notation, I am reading in data from a SQL Server database, the field in question is as follows 
&lt;BR /&gt; 
&lt;BR /&gt;Round(lunt.AverageNetRent*ua.Area,0) 
&lt;BR /&gt; 
&lt;BR /&gt;the field is defined as a bigDecimal in Talend on the input schema. 
&lt;BR /&gt; 
&lt;BR /&gt;Then I use tConvertType to convert to a String before I map it and write out to a CSV. The funny thing is that if there a value it displays correctly only when the calculation is 0 does it switch to scientific notation. Any ideas? Here is the data, 3 rows, first two have the issue in the first column (0E-8), the third row is displays a value of (64562.00000000) 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;0E-8,2001-08-01, 
&lt;BR /&gt;0E-8,2006-08-01, 
&lt;BR /&gt;64562.00000000,2006-08-01, 
&lt;BR /&gt; 
&lt;BR /&gt;Thanks 
&lt;BR /&gt;Derek</description>
      <pubDate>Sat, 16 Nov 2024 11:47:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/scientific-notation-being-written-out/m-p/2207673#M7211</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2024-11-16T11:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: scientific notation being written out</title>
      <link>https://community.qlik.com/t5/Talend-Studio/scientific-notation-being-written-out/m-p/2207674#M7212</link>
      <description>One reason could be the value is not exactly zero! This happens often while working or gathering values with Double or Float data type.</description>
      <pubDate>Sun, 05 Jan 2014 15:48:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/scientific-notation-being-written-out/m-p/2207674#M7212</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-05T15:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: scientific notation being written out</title>
      <link>https://community.qlik.com/t5/Talend-Studio/scientific-notation-being-written-out/m-p/2207675#M7213</link>
      <description>jlolling, can you explain when you say the value maybe not be exactly zero, what you mean. 
&lt;BR /&gt;. 
&lt;BR /&gt;So I ran a simple test, where I use the following select statement 
&lt;BR /&gt; 
&lt;BR /&gt;select 0.00000000, 0.0000000, 0.000000, 0.00000, 0.0000, 0.000, 0.00, 0 
&lt;BR /&gt; 
&lt;BR /&gt;and a schema that matches, ie. 
&lt;BR /&gt;field1 BigDecimal 28 8 
&lt;BR /&gt;field2 BigDecimal 28 7 
&lt;BR /&gt;field3 BigDecimal 28 6 
&lt;BR /&gt;field4 BigDecimal 28 5 
&lt;BR /&gt;field5 BigDecimal 28 4 
&lt;BR /&gt;field6 BigDecimal 28 3 
&lt;BR /&gt;field7 BigDecimal 28 2 
&lt;BR /&gt;field8 BigDecimal 28 0 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;As you can see from the results below it looks like any field with a scale of more than 6 with 0 results in scientific notation representation when you convert to string. 
&lt;BR /&gt;If you have data it does not use scientific notation? see second result set below. 
&lt;BR /&gt; 
&lt;BR /&gt;Can anyone confirm that this is expected behavior for Talend or Java? 
&lt;BR /&gt;And can anyone comeup with away around this? 
&lt;BR /&gt; 
&lt;BR /&gt;.------+------+--------+-------+------+------+------+------. 
&lt;BR /&gt;| tLogRow_4 | 
&lt;BR /&gt;|=-----+------+--------+-------+------+------+------+-----=| 
&lt;BR /&gt;|field1|field2|field3 |field4 |field5|field6|field7|field8| 
&lt;BR /&gt;|=-----+------+--------+-------+------+------+------+-----=| 
&lt;BR /&gt;|0E-8 |0E-7 |0.000000|0.00000|0.0000|0.000 |0.00 |0 | 
&lt;BR /&gt;'------+------+--------+-------+------+------+------+------' 
&lt;BR /&gt; 
&lt;BR /&gt;Second result set 
&lt;BR /&gt;----------+------+--------+-------+------+------+------+------. 
&lt;BR /&gt;| tLogRow_4 | 
&lt;BR /&gt;|=---------+------+--------+-------+------+------+------+-----=| 
&lt;BR /&gt;|field1 |field2|field3 |field4 |field5|field6|field7|field8| 
&lt;BR /&gt;|=---------+------+--------+-------+------+------+------+-----=| 
&lt;BR /&gt;|0.12345678|0E-7 |0.000000|0.00000|0.0000|0.000 |0.00 |0 | 
&lt;BR /&gt;'----------+------+--------+-------+------+------+------+------'</description>
      <pubDate>Sun, 05 Jan 2014 19:59:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/scientific-notation-being-written-out/m-p/2207675#M7213</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2014-01-05T19:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: scientific notation being written out</title>
      <link>https://community.qlik.com/t5/Talend-Studio/scientific-notation-being-written-out/m-p/2207676#M7214</link>
      <description>ok. I wish I was more proficient in Java, then it won't take so long to find a solution. :-), maybe a 2014 goal. 
&lt;BR /&gt;. 
&lt;BR /&gt;Found a method that I believe I need to use when converting a bid decimal to string. The method that needs to be applied is 
&lt;BR /&gt; 
&lt;BR /&gt;BigDecimal toPlainString() method 
&lt;BR /&gt; 
&lt;BR /&gt;In general, Java BigDecimal value scale and rounding mode can be set by setScale(scale, roundingMode) during a BigDecimal operation. To display a BigDecimal value, user can use either the toString() or toPlainString() methods. The toString() method may use scientific notation while toPlainString() never will. 
&lt;BR /&gt; 
&lt;BR /&gt;Anyone with other ideas, I would love to hear. 
&lt;BR /&gt; 
&lt;BR /&gt;Thanks 
&lt;BR /&gt;Derek</description>
      <pubDate>Sun, 05 Jan 2014 21:03:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/scientific-notation-being-written-out/m-p/2207676#M7214</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2014-01-05T21:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: scientific notation being written out</title>
      <link>https://community.qlik.com/t5/Talend-Studio/scientific-notation-being-written-out/m-p/2207677#M7215</link>
      <description>of course I now find a previous post on the forum addressing this issue. Here is a post that can be referenced. 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCsk1CAC" rel="nofollow noopener noreferrer"&gt;https://community.talend.com/t5/Design-and-Development/How-to-Convert-BigDecimal-to-String/td-p/59168&lt;/A&gt;</description>
      <pubDate>Sun, 05 Jan 2014 21:06:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/scientific-notation-being-written-out/m-p/2207677#M7215</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2014-01-05T21:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: scientific notation being written out</title>
      <link>https://community.qlik.com/t5/Talend-Studio/scientific-notation-being-written-out/m-p/2207678#M7216</link>
      <description>You could also use the Java build in class NumberFormat with its various formatting methods.
&lt;BR /&gt;
&lt;A href="http://docs.oracle.com/javase/7/docs/api/java/text/NumberFormat.html" rel="nofollow noopener noreferrer"&gt;http://docs.oracle.com/javase/7/docs/api/java/text/NumberFormat.html&lt;/A&gt;</description>
      <pubDate>Sun, 05 Jan 2014 21:11:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/scientific-notation-being-written-out/m-p/2207678#M7216</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-05T21:11:05Z</dc:date>
    </item>
  </channel>
</rss>

