One Star

Transforming Oracle NUMBER using Float

Hi Guys,
I'm not sure if this is a defect and I'm sure someone else has run into this before, although I havn't had much luck finding any posts about it. I am using Talend Oracle Studio 2.3.0.RC2_r8293.

I'm basically moving a NUMBER column from one DB Table to another. Regardless of what type I use though the tOracleInput component will throw the below SQL Exception:
java.sql.SQLException: Fail to convert to internal representation
The tOracleOutput component connects to a tOracleInput component via a main row. I have attached a screenshot of the schema. The Oracle schema reports GUCREDITPOINTVALUE as a NUMBER(5,2).
Any idea's why i'm receiving this exception?

The full exception is below:
java.sql.SQLException: Fail to convert to internal representation
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
at oracle.jdbc.driver.CharCommonAccessor.getFloat(CharCommonAccessor.java:267)
at oracle.jdbc.driver.OracleResultSetImpl.getFloat(OracleResultSetImpl.java:551)
at devenvironment.psh_mdx_lv_1a_tables_current_mdx_i.PSH_MDX_LV_1A_TABLES_CURRENT_MDX_I.tOracleInput_1Process(PSH_MDX_LV_1A_TABLES_CURRENT_MDX_I.java:1874)
at devenvironment.psh_mdx_lv_1a_tables_current_mdx_i.PSH_MDX_LV_1A_TABLES_CURRENT_MDX_I.tJava_1Process(PSH_MDX_LV_1A_TABLES_CURRENT_MDX_I.java:2331)
at devenvironment.psh_mdx_lv_1a_tables_current_mdx_i.PSH_MDX_LV_1A_TABLES_CURRENT_MDX_I.runJobInTOS(PSH_MDX_LV_1A_TABLES_CURRENT_MDX_I.java:5190)
at devenvironment.psh_mdx_lv_1a_tables_current_mdx_i.PSH_MDX_LV_1A_TABLES_CURRENT_MDX_I.main(PSH_MDX_LV_1A_TABLES_CURRENT_MDX_I.java:5104)
Job PSH_MDX_LV_1A_TABLES_CURRENT_MDX_I ended at 12:47 25/01/2008.
7 REPLIES
Community Manager

Re: Transforming Oracle NUMBER using Float

Hi
Please see this 1954 and create a bug on our bugtracker.
Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Transforming Oracle NUMBER using Float

I have logged this as as BUG 0002895.
Thanks for the link to the other post, that is a different issue.
Employee

Re: Transforming Oracle NUMBER using Float

Maybe you could try with a Double java type in place of Float ?
One Star

Re: Transforming Oracle NUMBER using Float

I've tried using Java types Float, Double, Integer, BigDecimal with DB Type NUMBER.
I've also tried using Float with DB Type FLOAT (even though the actual column is stored in the Database as NUMBER).
All these combinations return exactly the same error.
Community Manager

Re: Transforming Oracle NUMBER using Float

Hi
I've tried using Java types Float, Double, Integer, BigDecimal with DB Type NUMBER.
I've also tried using Float with DB Type FLOAT (even though the actual column is stored in the Database as NUMBER).
All these combinations return exactly the same error.

Currently, we can only translate NUMBER(x) into a Float type or other type, not NUMBER(x,y). Please report a bug to support NUMBER(x,y).
Thanks for your support!
Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Transforming Oracle NUMBER using Float

Hi
Currently, we can only translate NUMBER(x) into a Float type or other type, not NUMBER(x,y). Please report a bug to support NUMBER(x,y).

I can recreate this problem for Talend type Integers which are stored as DB Type INTEGER too.
I have also now found a way to have Talend work with the NUMBER DB Type i'm using. I have added more detail, including steps to reproduce the error, in BUG 0002895.
One Star

Re: Transforming Oracle NUMBER using Float

This turns out to be quite simple in hindsight and a stupid oversight on my part. I was clicking Yes when prompted for "Do you want to get the schema of the target component?". The schema's matched (they were the same column names and types) but, the order in which they appeared were different.
When I dragged the input view onto the job it automatically populated the query box.
When I used the "take from" function, it didn't update the guess query box but, it did change the order of columns in the schema.
Thus, Talend was trying to convert a String to an Float.
Because the schema is the same my specific issue is resolved in BUG 0002895. I wouldn't expect the "take from" function to auto update the query but, when I think about it how often would the incomming schema match the "guessed query"? Either way just something to think about now we all know what went on with this issue.