KNIME DB Reader - Number(38) SQL Handling

Hi.

I’ve a SQL query that when I run in an external program gives me the result of 9068697280905089, however when I run it within the Database Reader node KNIME gets the result 9,068,697,280,905,088

The DB field is Number (38) and the Column Type which KNIME returns is Number (Double)

Have you any idea why KNIME would change the last decimal in the returned result from a 9 to an 8?

Is this something you have seen before?

Thanks

Brendan

It would be helpful to know what database do you use and what the external tool name.

Hi

I’m using an Oracle DB and SQL Developer as the external tool to query the DB.

Regards

Brendan

I’ve found the solution to this using the data type mappings feature in the latest DB Connection nodes.

Regards

Brendan Doherty

2 Likes

Hi there @brendanPdoherty,

glad you solved it but what was the problem with default mapping in this case?

Br,
Ivan

The data value returned was different from that in the Oracle table as in the screen shot below. First one is from Oracle Query (Numeric 38 Data Type) the second image is the Default Data Type mapping to a Double which changes the last digit from a 9 to an 8.

2019-11-18%2016_57_43-Fwd_%20Can%20you%20help%20me%20understand%2C%20why%202%20different%20drive%20keys%20when%20I%20run%20in%20Knime%2C

Hi there,

yep, get that. But what have you changed in order to work? Changed mapping to which type?

Br,
Ivan

Numeric -> Long -> Number(Long) as in the screen shot below.

Hi there,

tnx. Maybe helps someone else as well :slight_smile:

Br,
Ivan

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.