← All databases

Database · Flight SQL

InfluxDB into Apache Arrow with ADBC

InfluxDB 3 Core (InfluxDB IOx 2.0, Arrow Flight SQL), read and written through adbcBridge — the ADBC driver that loads the database's ODBC driver — read-only on Linux, macOS arm64 and Windows x64. Everything below is the compatibility matrix's record for this row.

Status

Linux✓ read

PASS

macOS arm64✓ read

PASS (InfluxDB IOx (via ODBC) 02.00.0000; read-only) through a bridge built against iODBC — Python fetch 8,741,131 rows/s. Through unixODBC: the same driver-manager abort as Flight SQL (one driver binary behind all three)

Windows x64✓ read

PASS (influxdb:3-core, 100,002 points loaded with fixtures/load_influxdb3.py) — with the same text_as_binary fix as flightsql (the same driver binary; it failed the astral check the same way before it); 6,137,567 rows/s

Driver and connection string

ODBC driver
Flight SQL ODBC 0.9.7 (Dremio, open source)
Wire
Flight SQL
adbcBridge
0.1.1 (release)

The connection string the matrix used, as the connection strings reference records it (Arrow Flight SQL); {drv} is the driver library or its name from odbcinst.ini, and the host, port and credentials are the test server's.

Driver={drv};Host=127.0.0.1;Port=18181;useEncryption=false;database=adbc;

Python

import adbcbridge

# {drv}: the ODBC driver library (path), or its name from odbcinst.ini
conn = adbcbridge.connect(uri="Driver={drv};Host=127.0.0.1;Port=18181;useEncryption=false;database=adbc;")
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 InfluxDB 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

a second Flight SQL server behind the same driver, and it needed no new driver quirk (the SQLColumns one is shared with sqlflite — here it crashes only for tables whose Flight SQL schema carries no per-field metadata, InfluxDB's system and information_schema tables, while the entry's own iox tables fetch cleanly); the entry is read-only twice over (InfluxDB 3's SQL is query-only — DDL answers DDL not supported: <op>, DML DML not supported: <op>, and tables come into existence when line protocol is written to them over the HTTP API — and the driver has no SQLBindParameter); server side: a table is tags, fields and a nanosecond time column that is always spelled time, with no DATE, DECIMAL or binary type, so the entry reads time as ts and casts the date back in its own SELECT; fetch 1.03M rows/s

Read next