0

I have a python flask Bluemix/IBM cloud-application for which I would like to use to move data from Cloud object storage to DB2 Warehouse on Cloud.

To make it easier I started by creating this code in a Data Science Experience Notebook, which works perfectly. To connect to DB2 I am using the IBMDBPY-package. Now I am starting to migrate my code from the Notebook to the python flask application.

The connection to Cloud object Storage works, but when I want to connect it to DB2 it fails due to

"IdaDataBaseError: ibmdbpy::IdaDataBaseError: SQL_ERROR"

To be able to connect this locally I need to install a JDBC driver for DB2 which I can't because it is not supported on a Mac. According to the IBMDBPY-guide I have to upload two files from the JDBC driver to the directory where the IBMDBPY-package exists. But Because the packages are imported from the requirements.txt in the Flask-application I can't really put them in that folder.

Is there any solutions or workarounds regarding this? If I can only make it work when the application is running on the server and not locally that is fine as well. As long as everything works fine when application is running.

2 Answers 2

2

As regards Db2 client support for Mac, please see "Installing the IBM Data Server Driver Package software on Mac OS X"

Sign up to request clarification or add additional context in comments.

Comments

0

Sounds like you might be looking for the ibm-db python module. Give it a go in your flask app.

https://www.ibm.com/support/knowledgecenter/en/SSSNY3_10.1.0/com.ibm.swg.im.dbclient.python.doc/doc/t0054368.html

1 Comment

I use the IBMDBPY-package, the module you are referencing is a completely other package which would mean I have to rebuild my whole code. So I would rather not need to do that

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.