{"record":{"id":"5c4934628fcfafd7","repo":"pola-rs/polars","slug":"pyarrow-is-required-for-adbc-driver-manager-adb-5c4934","errorCode":null,"errorMessage":"pyarrow is required for adbc-driver-manager < {adbc_version_no_pyarrow_required} when using parameterized queries (via `execute_options`), found {adbc_str_version}.\nEither upgrade `adbc-driver-manager` (suggested) or install `pyarrow`","messagePattern":"pyarrow is required for adbc-driver-manager < (.+?) when using parameterized queries \\(via `execute_options`\\), found (.+?)\\.\nEither upgrade `adbc-driver-manager` \\(suggested\\) or install `pyarrow`","errorType":"exception","errorClass":"ModuleUpgradeRequiredError","httpStatus":null,"severity":"error","filePath":"py-polars/src/polars/io/database/functions.py","lineNumber":280,"sourceCode":"    # parameterised queries (via execute_options) without PyArrow installed\n    if (\n        execute_options is not None\n        and not _PYARROW_AVAILABLE\n        and type(connection).__module__.split(\".\", 1)[0].startswith(\"adbc\")\n    ):\n        adbc_version_no_pyarrow_required = \"1.7.0\"\n        adbc_driver_manager = import_optional(\"adbc_driver_manager\")\n        adbc_str_version = getattr(adbc_driver_manager, \"__version__\", \"0.0\")\n        if not parse_version(adbc_str_version) >= parse_version(\n            adbc_version_no_pyarrow_required\n        ):\n            msg = (\n                \"pyarrow is required for adbc-driver-manager < \"\n                f\"{adbc_version_no_pyarrow_required} when using parameterized queries (via \"\n                f\"`execute_options`), found {adbc_str_version}.\\nEither upgrade \"\n                \"`adbc-driver-manager` (suggested) or install `pyarrow`\"\n            )\n            raise ModuleUpgradeRequiredError(msg)\n\n    # return frame from arbitrary connections using the executor abstraction\n    with ConnectionExecutor(connection) as cx:\n        return cx.execute(\n            query=query,\n            options=execute_options,\n        ).to_polars(\n            batch_size=batch_size,\n            iter_batches=iter_batches,\n            schema_overrides=schema_overrides,\n            infer_schema_length=infer_schema_length,\n        )\n\n\n@overload\ndef read_database_uri(\n    query: str,\n    uri: str,","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/pola-rs/polars/blob/df599052daf96e7a9cc30a3b0c6bd25d6947e3c0/py-polars/src/polars/io/database/functions.py#L262-L298","documentation":"Raised by read_database() when an ADBC connection object is used with execute_options (parameterized query), PyArrow is not installed, and adbc-driver-manager is below 1.7.0. Passing Python sequences as bind parameters through ADBC without PyArrow requires driver-manager >= 1.7.0; older stacks need PyArrow to serialise parameters.","triggerScenarios":"pl.read_database(query, adbc_connection, execute_options={'parameters': (...)}) in an environment with adbc-driver-manager < 1.7.0 and no pyarrow.","commonSituations":"Reusing an adbc connection object (e.g. from adbc_driver_sqlite.dbapi.connect) with read_database; pyarrow-free deployments; driver-manager pinned below 1.7.0 while adopting parameter binding.","solutions":["Upgrade adbc-driver-manager to >= 1.7.0: pip install -U 'adbc-driver-manager>=1.7.0'","Or install pyarrow: pip install pyarrow","Or remove execute_options and bind values another way (e.g. SQLAlchemy connection with proper escaping)"],"exampleFix":"# before: adbc-driver-manager 1.6, no pyarrow\npl.read_database(q, adbc_conn, execute_options={\"parameters\": (40, 20)})\n\n# after\npip install -U 'adbc-driver-manager>=1.7.0'","handlingStrategy":"validation","validationCode":"from importlib.metadata import version\nfrom packaging.version import parse\n\nif execute_options and not _PYARROW_AVAILABLE:\n    if parse(version(\"adbc_driver_manager\")) < parse(\"1.7.0\"):\n        raise RuntimeError(\"upgrade adbc-driver-manager>=1.7.0 or install pyarrow\")","typeGuard":"def is_adbc_connection(conn: object) -> bool:\n    return type(conn).__module__.split(\".\", 1)[0].startswith(\"adbc\")","tryCatchPattern":null,"preventionTips":["Gate execute_options on a startup version/dependency check for adbc connections","Pin adbc-driver-manager>=1.7.0 in pyarrow-free deployments","Route parameterized reads through SQLAlchemy when the adbc stack cannot be upgraded"],"tags":["database","adbc","pyarrow","version","dependency"],"backgroundTag":null,"analyzedSha":"df599052daf96e7a9cc30a3b0c6bd25d6947e3c0","analyzedAt":"2026-08-16T12:10:03.978Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}