{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "primary": [
    {
      "id": "analytics-extraction",
      "title": "Query a database straight into a dataframe",
      "problem": "An ODBC or JDBC driver hands back rows. Something downstream then walks those rows and rebuilds columns before pandas, Polars or DuckDB can use them - two full copies of the data before any analysis starts.",
      "solution": "The driver decodes the wire protocol straight into Arrow column buffers. fetch_arrow_table() returns something pandas, Polars and DuckDB read natively, with no copy.",
      "example": {
        "language": "python",
        "code": "import adbc_driver_manager.dbapi as dbapi\n\nwith dbapi.connect(driver=\"arrowtds\",\n                   db_kwargs={\"uri\": \"sqlserver://dbuser:<password>@host:1433/?database=appdb&encrypt=true\"}) as conn:\n    cur = conn.cursor()\n    cur.execute(\"SELECT * FROM dbo.orders\")\n    table = cur.fetch_arrow_table()   # ready as Arrow\n\n    df = table.to_pandas()            # or polars.from_arrow(table)"
      },
      "audience": ["Data Engineers", "Analytics Engineers", "Data Scientists"]
    },
    {
      "id": "lakehouse-ingestion",
      "title": "Data lake and lakehouse ingestion",
      "problem": "Landing operational data as Parquet usually means an ETL tool or a row-by-row export, plus a vendor client library on every worker.",
      "solution": "Results already are Arrow, so writing Parquet is a direct hand-off with no intermediate representation, and the workers need no ODBC stack.",
      "example": {
        "language": "python",
        "code": "import adbc_driver_manager.dbapi as dbapi\nimport pyarrow.parquet as pq\n\nwith dbapi.connect(driver=\"arrowfebe\",\n                   db_kwargs={\"uri\": \"postgresql://dbuser:<password>@host:5432/appdb?sslmode=require\"}) as conn:\n    cur = conn.cursor()\n    cur.execute(\"SELECT * FROM public.orders\")\n    pq.write_table(cur.fetch_arrow_table(), \"orders.parquet\")"
      },
      "audience": ["Data Engineers", "Platform teams"]
    },
    {
      "id": "slim-containers",
      "title": "Slim containers and simple CI",
      "problem": "Oracle Instant Client, the SQL Server ODBC driver and libpq all have to be installed, licensed where applicable, version-matched and patched in every image and on every CI runner.",
      "solution": "The driver is a single library whose only runtime dependency beyond libc is OpenSSL. One installer line in the Dockerfile, no vendor packages, no version skew between environments.",
      "example": {
        "language": "bash",
        "code": "curl -fsSL https://raw.githubusercontent.com/arpe-io/adbc-drivers/main/install.sh \\\n  | sh -s -- arrowttc --license /path/to/your.lic"
      },
      "audience": ["Platform teams", "DevOps Engineers"]
    },
    {
      "id": "cross-database-code",
      "title": "One codebase, several databases",
      "problem": "Supporting SQL Server, PostgreSQL and Oracle usually means three connectivity stacks, three sets of deployment instructions and three code paths.",
      "solution": "Every driver installs an ADBC manifest and loads by name, so the same application code targets a different database by swapping the driver name and the URI.",
      "example": {
        "language": "python",
        "code": "import adbc_driver_manager.dbapi as dbapi\n\nTARGETS = {\n    \"sqlserver\":  (\"arrowtds\",  \"sqlserver://dbuser:<password>@host:1433/?database=appdb&encrypt=true\"),\n    \"postgresql\": (\"arrowfebe\", \"postgresql://dbuser:<password>@host:5432/appdb?sslmode=require\"),\n    \"oracle\":     (\"arrowttc\",  \"oracle://dbuser:<password>@dbhost:1521/appdb?ssl_mode=verify-full\"),\n}\n\ndriver, uri = TARGETS[\"postgresql\"]\nwith dbapi.connect(driver=driver, db_kwargs={\"uri\": uri}) as conn:\n    ..."
      },
      "audience": ["Application Developers", "ISVs"]
    },
    {
      "id": "odbc-replacement",
      "title": "Replacing an ODBC stack in analytics workloads",
      "problem": "The ODBC manager, the vendor driver and the row-to-column conversion together dominate the cost of reading data - and each one is an extra deployment and patching obligation.",
      "solution": "Point the workload at the ADBC driver instead. The wire protocol is decoded once, directly into Arrow, and the ODBC layer disappears from the deployment entirely.",
      "example": {
        "language": "python",
        "code": "# Before: pyodbc -> rows -> manual column rebuild -> pandas\n# After:\nimport adbc_driver_manager.dbapi as dbapi\n\nwith dbapi.connect(driver=\"arrowtds\",\n                   db_kwargs={\"uri\": \"sqlserver://dbuser:<password>@host:1433/?database=appdb&encrypt=true\"}) as conn:\n    cur = conn.cursor()\n    cur.execute(\"SELECT * FROM dbo.orders\")\n    df = cur.fetch_arrow_table().to_pandas()"
      },
      "audience": ["Data Engineers", "Database Administrators"]
    },
    {
      "id": "spatial-and-vector",
      "title": "Spatial and vector columns that arrive usable",
      "problem": "Geospatial and vector columns commonly arrive as opaque blobs or strings, and have to be parsed again on the client.",
      "solution": "SQL Server geometry / geography convert to GeoArrow WKB and SQL Server 2025 VECTOR(n) maps to Arrow fixed-size lists; PostGIS EWKB geometry is mapped natively by the PostgreSQL driver.",
      "example": {
        "language": "python",
        "code": "import adbc_driver_manager.dbapi as dbapi\n\nwith dbapi.connect(driver=\"arrowtds\",\n                   db_kwargs={\"uri\": \"sqlserver://dbuser:<password>@host:1433/?database=appdb&encrypt=true\"}) as conn:\n    cur = conn.cursor()\n    cur.execute(\"SELECT id, embedding, footprint FROM dbo.assets\")\n    table = cur.fetch_arrow_table()   # embedding: fixed-size list, footprint: GeoArrow WKB"
      },
      "audience": ["Data Scientists", "GIS teams", "Search / ML engineers"]
    }
  ],
  "metadata": {
    "lastUpdated": "2026-09-07",
    "dataFormat": "JSON",
    "purpose": "AI Agent Knowledge Base",
    "audience": "LLMs and AI Agents",
    "schemaVersion": "1.0.0"
  }
}
