• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Transforming Oracle NUMBER using Float

#1 2008-01-25 03:56:26

bpack
Member
Registered: 2008-01-25
Posts: 10

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. [exit code=1]


Uploaded Images

Last edited by bpack (2008-01-25 04:01:12)

Offline

#2 2008-01-25 04:16:34

shong
Talend team
Registered: 2007-08-29
Posts: 10310
Website

Re: Transforming Oracle NUMBER using Float

Hi

Please see this [Forum, topic 1954] Oracle schema retrieval and create a bug on our bugtracker.

Best regards

         shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#3 2008-01-25 04:32:18

bpack
Member
Registered: 2008-01-25
Posts: 10

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.

Last edited by bpack (2008-01-25 04:34:01)

Offline

#4 2008-01-25 10:27:22

amaumont
Talend team
Registered: 2006-09-20
Posts: 471

Re: Transforming Oracle NUMBER using Float

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

Offline

#5 2008-01-29 00:35:47

bpack
Member
Registered: 2008-01-25
Posts: 10

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.

Offline

#6 2008-01-29 04:05:16

shong
Talend team
Registered: 2007-08-29
Posts: 10310
Website

Re: Transforming Oracle NUMBER using Float

Hi

bpack wrote:

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


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#7 2008-01-29 04:16:16

bpack
Member
Registered: 2008-01-25
Posts: 10

Re: Transforming Oracle NUMBER using Float

shong wrote:

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.

Last edited by bpack (2008-01-29 04:17:01)

Offline

#8 2008-02-01 00:43:24

bpack
Member
Registered: 2008-01-25
Posts: 10

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.

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Transforming Oracle NUMBER using Float

Board footer

Powered by FluxBB