adbc-driver-flightsql is a Python driver for connecting to databases via Apache Arrow Flight SQL. It provides both a low-level ADBC API and a DBAPI 2.0-compatible interface for efficient, Arrow-native data transfer. The library is actively maintained as part of the Apache Arrow ADBC project, with frequent releases, typically on a monthly or bi-monthly cadence. The current version is 1.11.0.
pip install adbc-driver-flightsql pyarrowVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates connecting to an Apache Arrow Flight SQL server using the DBAPI 2.0 interface, executing a simple query, and fetching results as an Arrow Table. Connection details and authentication are typically passed via the URI and `db_kwargs` parameter, using environment variables for sensitive information.
Pass appropriate `db_kwargs` or `conn_kwargs` to the `connect` function, such as `db_kwargs={'username': 'user', 'password': 'pass'}` or `db_kwargs={'adbc.flight.sql.authorization_header': 'Bearer <token>'}`. Consult your Flight SQL server's documentation for required authentication schemes.Set specific timeout options via `db_kwargs` or `conn_kwargs`. For example, `db_kwargs={'adbc.flight.sql.rpc.timeout_seconds.connect': '60', 'adbc.flight.sql.rpc.timeout_seconds.query': '120'}` to increase connection and query timeouts respectively.Upgrade to version 1.10.0 or later and utilize the new `adbc_ingest` method for bulk data loading, which offers improved performance and automatic schema inference.
Always install `adbc-driver-flightsql` alongside `pyarrow`: `pip install adbc-driver-flightsql pyarrow`.