Implementation
This handler is implemented usingIfxPy/IfxPyDbi, a Python library that allows you to use Python code to run SQL commands on the Informix database.
The required arguments to establish a connection are as follows:
useris the username associated with database.passwordis the password to authenticate your access.hostis the hostname or IP address of the server.portis the port through which TCP/IP connection is to be made.databaseis the database name to be connected.schema_nameis the schema name to get tables.serveris the name of server you want connect.logging_enableddefines whether logging is enabled or not. Defaults toTrueif not provided.
If you installed MindsDB locally via pip, you need to install all handler dependencies manually. To do so, go to the handler’s folder (mindsdb/integrations/handlers/informix_handler) and run this command:
pip install -r requirements.txt.Usage
In order to make use of this handler and connect to the Informix database in MindsDB, the following syntax can be used:This integration uses
IfxPy. As it is in development stage, it can be install using pip install IfxPy. However, it doesn’t work with higher versions of Python, therefore, you have to build it from source.On Linux
On Linux
- This code downloads and extracts the
onedb-ODBCdriver used to make connection:
- Add enviroment variables in the
.bashrcfile:
- This code clones the
IfxPyrepo, builds a wheel, and installs it:
On Windows
On Windows
- This code downloads and extracts the
onedb-ODBCdriver used to make connection:
- Add an enviroment variable:
-
Add
%INFORMIXDIR%\binto the PATH environment variable. -
This code clones the
IfxPyrepo, builds a wheel, and installs it: