Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

ODBC connector or bridge for DB2 #46

Closed
amitsadaphule opened this issue May 12, 2020 · 3 comments
Closed

ODBC connector or bridge for DB2 #46

amitsadaphule opened this issue May 12, 2020 · 3 comments
Labels
question Further information is requested

Comments

@amitsadaphule
Copy link

This is more of a query than an issue. I couldn't find a recommended channel for queries/questions. My team was looking for DB2 ODBC connector for one of the products, when we came across this connector. We were able to build it on ppc64le RHEL7.6 and the test execution was successful too. However, the product requirement is an ODBC connector. The documentation on the home page clearly mentions that this is a plugin for IBM DB2 Jdbc connection. I was wondering if there is something that can maybe act as a bridge for ODBC using this connector or if you have an ODBC DB2 connector. Thanks!

@shawnzhu
Copy link
Contributor

To be precise, this connector for Prestosql does depend on JDBC type 4 driver of Db2. see https://github.com/IBM/presto-db2/blob/acc92bfe7f408255c61d448503c316069b4085e9/pom.xml#L17-L21

So it's not based on ODBC connection (JDBC type 1, can be bridged to JDBC) nor any other native compiled code (JDBC type 2).

I was wondering if there is something that can maybe act as a bridge for ODBC using this connector

This is possible since you can try to hack the method getConnectionFactory() via JDBC type 1 driver (uses ODBC interface).

https://github.com/IBM/presto-db2/blob/acc92bfe7f408255c61d448503c316069b4085e9/src/main/java/io/prestosql/plugin/db2/DB2ClientModule.java#L55-L70

Following☝️approach, it will need more work including installing/redistributing Db2's ODBC drivers/dependencies for specific Db2 release/installation. Which might not be done via this project under Apache License v2.0.

Out of the context of prestosql, Db2 client driver for Python/Node.js/Golang depend on ODBC driver and all of them works out of box. E.g., https://github.com/ibmdb/python-ibmdb

@shawnzhu shawnzhu added the question Further information is requested label May 12, 2020
@amitsadaphule
Copy link
Author

Thanks for the quick and detailed response @shawnzhu! I'll discuss the options with my team.

@amitsadaphule
Copy link
Author

@gerrith3 @seth-priya FYI

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants