<?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: String to BigDecimal - precision error in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/String-to-BigDecimal-precision-error/m-p/2294783#M67627</link>
    <description>Hi, &lt;BR /&gt;Which talend version do you used? We will take a testing for your case.&lt;BR /&gt;Best regards&lt;BR /&gt;Sabrina</description>
    <pubDate>Fri, 19 Apr 2013 10:48:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-04-19T10:48:41Z</dc:date>
    <item>
      <title>String to BigDecimal - precision error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-BigDecimal-precision-error/m-p/2294780#M67624</link>
      <description>Dear i have a string to convert to a BigDecimal(10,8) related to an oracle column of number (10,8) type. 
&lt;BR /&gt;In my Tmap i can convert with this "new BigDecimal(row9.conv).setScale(8,BigDecimal.ROUND_HALF_UP)" 
&lt;BR /&gt;But i receive an oracle error 
&lt;BR /&gt;ORA-01438: valeur incohérente avec la précision indiquée pour cette colonne 
&lt;BR /&gt;Any ideas ? 
&lt;BR /&gt;Regards 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEKb.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128147iB572FB3D3FDC013C/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEKb.jpg" alt="0683p000009MEKb.jpg" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEOm.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/148629i4773C2462BBD013F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEOm.jpg" alt="0683p000009MEOm.jpg" /&gt;&lt;/span&gt;</description>
      <pubDate>Fri, 19 Apr 2013 09:22:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-BigDecimal-precision-error/m-p/2294780#M67624</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-19T09:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: String to BigDecimal - precision error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-BigDecimal-precision-error/m-p/2294781#M67625</link>
      <description>Hi
&lt;BR /&gt;For debug, add a tLogRow before tOracleOutput, and check the option 'die on error' on tOracleOutput, print the data on the console and see which data leads to the error.
&lt;BR /&gt;Shong</description>
      <pubDate>Fri, 19 Apr 2013 10:29:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-BigDecimal-precision-error/m-p/2294781#M67625</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-19T10:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: String to BigDecimal - precision error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-BigDecimal-precision-error/m-p/2294782#M67626</link>
      <description>for the data see my print screen (data viewer)
&lt;BR /&gt;See error below 
&lt;BR /&gt;Exception in component tOracleOutput_4
&lt;BR /&gt;java.sql.SQLException: ORA-01438: valeur incohérente avec la précision indiquée pour cette colonne
&lt;BR /&gt; at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:74)
&lt;BR /&gt; at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:131)
&lt;BR /&gt; at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:204)
&lt;BR /&gt; at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
&lt;BR /&gt; at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
&lt;BR /&gt; at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
&lt;BR /&gt; at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
&lt;BR /&gt; at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:953)
&lt;BR /&gt; at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)
&lt;BR /&gt; at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
&lt;BR /&gt; at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3468)
&lt;BR /&gt; at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1062)
&lt;BR /&gt;Regards</description>
      <pubDate>Fri, 19 Apr 2013 10:32:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-BigDecimal-precision-error/m-p/2294782#M67626</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-19T10:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: String to BigDecimal - precision error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-BigDecimal-precision-error/m-p/2294783#M67627</link>
      <description>Hi, &lt;BR /&gt;Which talend version do you used? We will take a testing for your case.&lt;BR /&gt;Best regards&lt;BR /&gt;Sabrina</description>
      <pubDate>Fri, 19 Apr 2013 10:48:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-BigDecimal-precision-error/m-p/2294783#M67627</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-19T10:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: String to BigDecimal - precision error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-BigDecimal-precision-error/m-p/2294784#M67628</link>
      <description>Talend Enterprise Data Integration Cluster edition 5.1.1r84309
&lt;BR /&gt;regards</description>
      <pubDate>Fri, 19 Apr 2013 10:49:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-BigDecimal-precision-error/m-p/2294784#M67628</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-19T10:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: String to BigDecimal - precision error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-BigDecimal-precision-error/m-p/2294785#M67629</link>
      <description>Hi, 
&lt;BR /&gt;I have made a testing for the expression, and it is totally correct(see my screenshots). 
&lt;BR /&gt;I suspect something wrong with the DB output, could you give us more information about that? It suggested that use 
&lt;A href="https://help.talend.com/search/all?query=tLogCatcher&amp;amp;content-lang=en" target="_blank" rel="nofollow noopener noreferrer"&gt;tLogcatcher&lt;/A&gt; to catch the java exception from your oracle DB as @shong mentioned. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Sabrina 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MENW.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157606i812384A8F920E5E4/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MENW.png" alt="0683p000009MENW.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEOO.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/153890iA13F7F11A3A7336E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEOO.png" alt="0683p000009MEOO.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEKx.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142881i1983D206B8BA3949/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEKx.png" alt="0683p000009MEKx.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Fri, 19 Apr 2013 12:24:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-BigDecimal-precision-error/m-p/2294785#M67629</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-19T12:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: String to BigDecimal - precision error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-BigDecimal-precision-error/m-p/2294786#M67630</link>
      <description>See my screenShot attached 
&lt;BR /&gt;All oracle number defined as NUMBER(10,4). 
&lt;BR /&gt;You can see my value with two decimal but i still have an error. 
&lt;BR /&gt;regards 
&lt;BR /&gt;Exception in component tOracleOutput_4 
&lt;BR /&gt;java.sql.SQLException: ORA-01438: valeur incohérente avec la précision indiquée pour cette colonne 
&lt;BR /&gt; at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:74) 
&lt;BR /&gt; at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:131) 
&lt;BR /&gt; at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:204) 
&lt;BR /&gt; at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455) 
&lt;BR /&gt; at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413) 
&lt;BR /&gt; at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034) 
&lt;BR /&gt; at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194) 
&lt;BR /&gt; at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:953) 
&lt;BR /&gt; at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222) 
&lt;BR /&gt; at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387) 
&lt;BR /&gt; at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3468) 
&lt;BR /&gt; at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1062) 
&lt;BR /&gt;142013-04-26 15:51:28|java.sql.SQLException 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA5A.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/143082iB236712184B767DA/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA5A.png" alt="0683p000009MA5A.png" /&gt;&lt;/span&gt;RA-01438: valeur incohérente avec la précision indiquée pour cette colonne 
&lt;BR /&gt; at datawarehouse.dwh_fact_mre_0_1.dwh_fact_mre.tFileInputDelimited_5Process(dwh_fact_mre.java:4092) 
&lt;BR /&gt; at datawarehouse.dwh_fact_mre_0_1.dwh_fact_mre.tETLMRELog_7Process(dwh_fact_mre.java:1193) 
&lt;BR /&gt; at datawarehouse.dwh_fact_mre_0_1.dwh_fact_mre.tETLMREStart_4Process(dwh_fact_mre.java:4677) 
&lt;BR /&gt; at datawarehouse.dwh_fact_mre_0_1.dwh_fact_mre.tWarn_4Process(dwh_fact_mre.java:8224) 
&lt;BR /&gt; at datawarehouse.dwh_fact_mre_0_1.dwh_fact_mre.tSetGlobalVar_4Process(dwh_fact_mre.java:8090) 
&lt;BR /&gt; at datawarehouse.dwh_fact_mre_0_1.dwh_fact_mre.runJobInTOS(dwh_fact_mre.java:11114) 
&lt;BR /&gt; at datawarehouse.dwh_fact_mre_0_1.dwh_fact_mre.main(dwh_fact_mre.java:10896) 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEIV.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136557i7C71D478E0434EF6/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEIV.jpg" alt="0683p000009MEIV.jpg" /&gt;&lt;/span&gt;</description>
      <pubDate>Fri, 26 Apr 2013 14:54:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-BigDecimal-precision-error/m-p/2294786#M67630</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-26T14:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: String to BigDecimal - precision error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-BigDecimal-precision-error/m-p/2294787#M67631</link>
      <description>Hi 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;All oracle number defined as NUMBER(10,4).&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Can you please show us the table definition? In your first post, you said the table has a column, number(10,8) type, but now All oracle number defined as Number(10, 4)? 
&lt;BR /&gt;The error indicates inconsistent value with the precision indicated in this column, so I am sure we need to check the precision of the data will be inserted into the number column of table. 
&lt;BR /&gt;Shong</description>
      <pubDate>Sat, 27 Apr 2013 12:33:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-BigDecimal-precision-error/m-p/2294787#M67631</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-27T12:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: String to BigDecimal - precision error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-to-BigDecimal-precision-error/m-p/2294788#M67632</link>
      <description>This is the definition of the table : 
&lt;BR /&gt;CREATE TABLE BAAN_MRE.DW_STOCK_FACT 
&lt;BR /&gt;( 
&lt;BR /&gt; ID NUMBER(8), 
&lt;BR /&gt; ITEM_ID NUMBER(8), 
&lt;BR /&gt; REAL_STOCK NUMBER(10,4), 
&lt;BR /&gt; BLK_STOCK NUMBER(10,4), 
&lt;BR /&gt; ORD_STOCK NUMBER(10,4), 
&lt;BR /&gt; RES_STOCK NUMBER(10,4), 
&lt;BR /&gt; AUD_CREATION_USER VARCHAR2(30 BYTE) NOT NULL, 
&lt;BR /&gt; AUD_CREATION_PGM VARCHAR2(30 BYTE) NOT NULL, 
&lt;BR /&gt; AUD_CREATION_DATE DATE NOT NULL, 
&lt;BR /&gt; AUD_LASTUPD_USER VARCHAR2(30 BYTE) NOT NULL, 
&lt;BR /&gt; AUD_LASTUPD_PGM VARCHAR2(30 BYTE) NOT NULL, 
&lt;BR /&gt; AUD_LASTUPD_DATE DATE NOT NULL 
&lt;BR /&gt;) 
&lt;BR /&gt;I already set the scale of the BigDecimal in my tmap like that : 
&lt;BR /&gt;(tools.translateScientist(inv001.allo)).setScale(2,BigDecimal.ROUND_UP) 
&lt;BR /&gt;This is the code : 
&lt;BR /&gt;public static BigDecimal translateScientist(String val){ 
&lt;BR /&gt; BigDecimal myval = new BigDecimal("0"); 
&lt;BR /&gt; String someString; 
&lt;BR /&gt; int pos = val.indexOf("e"); 
&lt;BR /&gt; if (pos &amp;gt; 0){ 
&lt;BR /&gt; someString = val.substring(0,pos) ; 
&lt;BR /&gt; System.out.print(someString); 
&lt;BR /&gt; myval = (new BigDecimal(String.valueOf(someString)).multiply(new BigDecimal("10"))).pow(Integer.parseInt(val.substring(pos + 1))); 
&lt;BR /&gt; }else{ 
&lt;BR /&gt; myval = new BigDecimal(val); 
&lt;BR /&gt; } 
&lt;BR /&gt; myval.setScale(2,BigDecimal.ROUND_UP); 
&lt;BR /&gt; return myval; 
&lt;BR /&gt; } 
&lt;BR /&gt;Regards</description>
      <pubDate>Mon, 29 Apr 2013 08:41:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-to-BigDecimal-precision-error/m-p/2294788#M67632</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-29T08:41:31Z</dc:date>
    </item>
  </channel>
</rss>

