Using Python with Cache in a Docker container

Hi

I am working with a Caché system with a Python binding and big datasets in health care. I am using the Python library Pandas and Jupyter notebook for data manipulation and often special modules for different projects, including different versions of Python. To keep the environments separated, I have been testing Docker, but I am at loss on how to install the Python binding. Has anyone any experience with this? Or better yet, a Docker image that has the binding installed?

I am also considering that Docker might not be the suitable for this situation and I am grateful for any thoughts on this.

Regards

Mads

  • 0
  • 0
  • 177
  • 4
  • 2

Answers

Hi Mads, if building your Python code right in Caché is an option, please check PythonGateway - this is  another way to deploy Python (and R - check RGateway). If you can also use Ensemble, then you will be able to create "adaptive processes" using those extensions. PyhtonGateway has also a docker packaging, if needed.

Thanks for the feedback, Sergey. 

We have an external developer that handles the system, so I would prefer to leave the installation as is and connect remotely. 

Hi Mads,

I don't have a lot of experience with Pandas, but you might be able to connect to Caché using the InterSystems JDBC driver. I know this is possible using Spark. You would need to move cachejdbc.jar into your container and set up some kind of classpath correctly so that Pandas can find the jar file.

I hope this helps.

David

Hi David

I am looking into using the JDBC driver. This method will also allow the use of cursors which is not available with the python binding, if I have understood it correctly. Will let you know how it goes.

Thanks.

Update

I managed to connect to the Cache system remotely and ran som sample queries fetching data with the JDBC driver. Unfortunately it is much slower than with the Python binding.  In my simple test it was in fact nearly 20 times slower. Thanks for the suggestion anyway.

Comments

Hi Mads!

If you want to use Caché/IRIS from Python side only maybe you want to try Python IRIS Native API in recently announced IRIS 2019.2 preview version?