adbc-driver-sqlite provides Python bindings for the Arrow Database Connectivity (ADBC) SQLite driver, offering a DBAPI 2.0 / PEP 249-compatible interface. It allows for Arrow-native access to SQLite databases. The current version is 1.11.0, and the project generally follows a bimonthly release cadence for minor versions.
pip install adbc-driver-sqliteVerified import paths — ran on the pinned version, not inferred.
Connects to an in-memory SQLite database (or a specified URI), creates a table, inserts data, and fetches results as an Arrow Table using the DBAPI 2.0 interface.
Use unique URI filenames (e.g., 'file:mydatabase?mode=memory&cache=shared') or manage connection lifecycles carefully for in-memory databases.
Ensure consistent data types within columns, especially when ingesting or querying large datasets with varying data. The `adbc.sqlite.query.batch_rows` option can influence how many rows are used for initial type inference.
Execute an explicit `COMMIT;` (or `ROLLBACK;`) before attempting to change such PRAGMA settings. Alternatively, ensure `autocommit=True` is set during connection for specific scenarios.
If UDFs are critical, consider using the native `sqlite3` module directly or explore if ADBC's C++ driver offers mechanisms for UDF registration that can be exposed via Python bindings in future versions.
Consult the ADBC SQLite driver documentation for the correct sequence of setting options or calling `enable_load_extension` and `load_extension` methods to properly load SQLite extensions.
Ensure the library is in a system-wide search path (e.g., `/usr/local/lib`) or add its directory to `LD_LIBRARY_PATH` (Linux/macOS) or `PATH` (Windows) environment variables before running Python.
Install the module using pip: 'pip install adbc-driver-sqlite'.
Import the function correctly: 'from adbc_driver_sqlite.dbapi import connect'.
Use the method on a cursor object: 'cursor.fetch_arrow_table()'.
Use the correct parameter name: 'connect(uri="your_database_uri")'.
Ensure the URI is correct and the database file exists at the specified location.