Ask Your Question
1

JDBC issues with DECFLOAT columns in DB2

asked 2017-09-21 13:45:22 -0500

mstang gravatar image

updated 2017-09-21 15:55:11 -0500

metadaddy gravatar image

I'm getting this error:

com.streamsets.pipeline.api.StageException: JDBC_37 - Unsupported type 1111 for column PRICE

when I try and use the JDBC consumer on a DB2 database and include a column of datatype DECFLOAT. Trying the same from sqlline with the same JDBC driver/server I don't have any issues. I'm not sure what would be different about the way StreamSets submits/receives the query to generate this error. Any ideas?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-09-21 15:52:40 -0500

metadaddy gravatar image

DECFLOAT is a proprietary DB2 datatype and thus not part of the standard set of JDBC datatypes. You may be able to resolve the problem by writing a query to CAST the DECFLOAT into a standard JDBC datatype, such as DECIMAL. If this doesn't work, please create an issue. I know we recently implemented a fix for a similar problem with Oracle's TIMESTAMP WITH TIMEZONE datatype.

edit flag offensive delete link more

Comments

Thanks, I was able to cast the decfloat into a double. The downside is now I have to write a full query instead of a select * but it does work.

mstang gravatar imagemstang ( 2017-09-21 21:25:48 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-09-21 13:45:22 -0500

Seen: 248 times

Last updated: Sep 21 '17