IBM Informix into Apache Arrow with ADBC
IBM Informix 15.0.1 (developer edition), read and written through adbcBridge — the ADBC driver that loads the database's ODBC driver — verified on Linux, macOS arm64 and Windows x64. Everything below is the compatibility matrix's record for this row.
Status
PASS
PASS (IDS 12.10, same arm64 clidriver; server amd64 emulated)
PASS (IDS 12.10 developer edition over the DRDA listener, same clidriver 12.1.4 alias and Authentication=SERVER as db2; adbc database created with dbaccess per the README) — after two Windows-only fixes: the IDS quirk relied on wchar_as_utf8, which the Windows block resets, so the astral parameter still went SQL_C_WCHAR and the INSERT failed -415 Data conversion error; narrow_params (the Ignite mechanism) keeps it on SQL_C_CHAR, and DB2CODEPAGE=1208 in the environment tells the CLI driver those bytes are UTF-8 (without it the driver reads them as cp1252 and the row stores double-encoded, héllo). Verified first with pyodbc: SQL_C_CHAR + UTF-8 stores and reads héllo 🚀 byte-exact, wide UTF-16 gets -415. Fetch 591,439 rows/s, array ingest 91,977
Driver and connection string
- ODBC driver
- Db2 clidriver (
libdb2.so, DRDA) - Wire
- native ODBC
- adbcBridge
- 0.1.1 (release)
The connection string the matrix used, as the connection strings reference records it (IBM DRDA (Db2 and Informix)); {drv} is the driver library or its name from odbcinst.ini, and the host, port and credentials are the test server's.
Driver={drv};Database=adbc;Hostname=127.0.0.1;Port=19089;Protocol=TCPIP;Uid=informix;Pwd=in4mix;
Python
import adbcbridge
# {drv}: the ODBC driver library (path), or its name from odbcinst.ini
conn = adbcbridge.connect(uri="Driver={drv};Database=adbc;Hostname=127.0.0.1;Port=19089;Protocol=TCPIP;Uid=informix;Pwd=in4mix;")
with conn.cursor() as cur:
cur.execute("SELECT * FROM my_table")
table = cur.fetch_arrow_table() # pyarrow.Table
Polars and pandas
import polars as pl, pandas as pd
df = pl.read_database("SELECT * FROM my_table", connection=conn) # Polars, Arrow-native
pdf = pd.read_sql("SELECT * FROM my_table", conn) # pandas 2.2+, ADBC connection
pip install adbcbridge brings the driver library; the IBM Informix ODBC driver is installed the way its vendor documents, then named in Driver=. Rust, Go, C# and Java use the same connection string through their ADBC driver managers — see the docs.
What the matrix recorded
same libdb2.so as Db2, so keyed on SQL_DBMS_NAME "IDS", not the driver name: no usable SQL_C_WCHAR params (UTF-8 narrow path instead), SQL_C_BIT params break the DRDA stream so booleans go as integers; 32-bit SQLLEN as for Db2; BYTE described as IBM's own SQL_BLOB type code (-98); server side: GL_USEGLU=1 for 4-byte UTF-8, DELIMIDENT=y for the quoted identifiers ingest emits, DATETIME YEAR TO FRACTION(5) timestamps; ingest 15.6k rows/s (130k array), fetch 751k rows/s