Reputation: 780
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.
Upvotes: 0
Views: 1008
Reputation: 1508
Sounds like you might be looking for the ibm-db python module. Give it a go in your flask app.
Upvotes: 0
Reputation: 12287
As regards Db2 client support for Mac, please see "Installing the IBM Data Server Driver Package software on Mac OS X"
Upvotes: 2