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:
user
is the username associated with database.password
is the password to authenticate your access.host
is the hostname or IP address of the server.port
is the port through which TCP/IP connection is to be made.database
is the database name to be connected.schema_name
is the schema name to get tables.server
is the name of server you want connect.logging_enabled
defines whether logging is enabled or not. Defaults toTrue
if 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-ODBC
driver used to make connection:
- Add enviroment variables in the
.bashrc
file:
- This code clones the
IfxPy
repo, builds a wheel, and installs it:
On Windows
On Windows
- This code downloads and extracts the
onedb-ODBC
driver used to make connection:
- Add an enviroment variable:
-
Add
%INFORMIXDIR%\bin
to the PATH environment variable. -
This code clones the
IfxPy
repo, builds a wheel, and installs it: