SqlAlchemy using a REST engine

29 views
Skip to first unread message

Nestor Diaz

unread,
Jul 14, 2019, 9:10:07 PM7/14/19
to sqlalchemy
Hi everybody.

I have this situation:
  1. I need to extract data from an Informix Database.
  2. Informix is not a supported engine in SqlAlchemy.
  3. There is a python informix driver, in order for it to work you must install the informix SDK, and is definitely a PITA.
  4. Informix now have a REST interface, you can even execute SQL sentences throught the REST interface and have the results in JSON, no need to install client libraries, good ! https://www.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/com.ibm.json.doc/ids_json_sql_rest.htm
Since I can execute any SQL statement via REST , I suppose I can develop some "driver" for informix using this REST interface, in the beginning the idea is to execute any arbitrary SQL statement that implements the whole SqlAlchemy functionality.

For those who already know how to develop such drivers I would like do receive some hints about where to start with that, or if there is some documentation about where to start I will appreciate such information.

Thanks.

--
Nestor



Mike Bayer

unread,
Jul 15, 2019, 8:59:54 AM7/15/19
to noreply-spamdigest via sqlalchemy


I dont have any special insight on this.     It would obviously perform pretty poorly, but overall the API you'd want to target first is pep 249: https://www.python.org/dev/peps/pep-0249/  that does all the REST stuff, then SQLAlchemy dialect is documented at https://github.com/sqlalchemy/sqlalchemy/blob/master/README.dialects.rst, I was under the impression that ibm_db_sa https://pypi.org/project/ibm-db-sa/ supported informix but I'm not sure this is the case right now.
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
 
 
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description.
---
You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+...@googlegroups.com.
To post to this group, send email to sqlal...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nestor Diaz

unread,
Jul 15, 2019, 9:47:51 PM7/15/19
to sqlal...@googlegroups.com
Well ... it seems that if I want to use SA with Informix I have to code
the SA dialect code, 'ibm-db-sa' as I review it doesn't support
Informix, the best thing I have found is
https://github.com/OpenInformix/IfxPy , just did some simple test and
worked ok.

I will post any good news in case I will be able to integrate Informix
with SA.

--
Nestor.


On 7/15/19 7:59 AM, Mike Bayer wrote:
>
>
> I dont have any special insight on this.     It would obviously
> perform pretty poorly, but overall the API you'd want to target first
> is pep 249: https://www.python.org/dev/peps/pep-0249/  that does all
> the REST stuff, then SQLAlchemy dialect is documented at
> https://github.com/sqlalchemy/sqlalchemy/blob/master/README.dialects.rst,
> <https://github.com/sqlalchemy/sqlalchemy/blob/master/README.dialects.rst>
> I was under the impression that ibm_db_sa
> https://pypi.org/project/ibm-db-sa/ supported informix but I'm not
> sure this is the case right now.
>
[...]


Reply all
Reply to author
Forward
0 new messages