Tools & Integrations¶
ADBC works alongside many popular data tools and frameworks. This page describes how ADBC fits into each ecosystem.
Apache DataFusion¶
Apache DataFusion integrates with ADBC in two ways:
DataFusion is available as an ADBC driver — the DataFusion ADBC driver lets you run DataFusion queries from any ADBC client library.
ADBC table provider — the ADBC table provider for DataFusion lets you query other databases from DataFusion. A table provider exposes an external data source as a table in DataFusion, so you can register a database table via an ADBC driver and query it with DataFusion SQL alongside your other data sources.
databow¶
databow is a command-line tool for querying databases via ADBC. It provides an interactive SQL shell with syntax highlighting, formatted output, and support for exporting results to JSON, CSV, or Arrow IPC files.
See the databow documentation for more details.
dbc¶
dbc is a command-line tool from Columnar for installing and managing ADBC drivers on your system. It handles downloading driver binaries, placing them in standard locations, and keeping them up to date—so you don’t have to build drivers from source or manage shared libraries by hand.
See the dbc documentation for how to install and use dbc.
DuckDB¶
DuckDB integrates with ADBC in two ways:
DuckDB itself is an ADBC driver — DuckDB (technically libduckdb) exposes an ADBC interface so you can connect to a DuckDB database from any ADBC client library. See DuckDB Support for details on using DuckDB as an ADBC driver.
DuckDB extensions — Two DuckDB community extensions, adbc and adbc_scanner, let you query other databases from DuckDB using ADBC drivers.
GDAL¶
GDAL (Geospatial Data Abstraction Library) supports reading spatial data from databases via ADBC through its ADBC OGR driver (added in GDAL 3.11). The driver is read-only. This lets you use any ADBC-compatible database as a vector data source in tools like ogrinfo and ogr2ogr.
See the GDAL ADBC driver documentation for full details.
Go database/sql¶
The Go ADBC client library provides an adapter so ADBC drivers can be used through Go’s standard database/sql interface. This means you can use ADBC drivers with any library or framework that accepts a *sql.DB.
import (
"database/sql"
"github.com/apache/arrow-adbc/go/adbc/sqldriver"
"github.com/apache/arrow-adbc/go/adbc/drivermgr"
)
// Register the ADBC driver manager as a database/sql driver.
sql.Register("flightsql", sqldriver.Driver{Driver: &drivermgr.Driver{}})
db, err := sql.Open("flightsql", "uri=grpc://localhost:12345")
See the Go documentation for full details.
pandas¶
pandas can read query results from any ADBC driver via the adbc_driver_manager package. Because ADBC collects results as Arrow, the conversion to a pandas DataFrame is efficient and avoids unnecessary copies.
import adbc_driver_manager.dbapi as dbapi
import pandas as pd
# The postgresql driver must be installed first with: dbc install postgresql
with dbapi.connect(driver="postgresql", uri="postgresql://localhost:5432/mydb") as conn:
df = pd.read_sql("SELECT * FROM orders", conn)
ADBC connections are compatible with pd.read_sql, pd.read_sql_query, and pd.read_sql_table.
See the recipe Using Pandas and ADBC for more examples.
Polars¶
Polars has native ADBC support via read_database and write_database. ADBC provides zero-copy Arrow transfer between Polars and the database.
import adbc_driver_manager.dbapi as dbapi
import polars as pl
# The postgresql driver must be installed first with: dbc install postgresql
with dbapi.connect(driver="postgresql", uri="postgresql://localhost:5432/mydb") as conn:
# Read from a database
df = pl.read_database(
query="SELECT * FROM orders",
connection=conn,
)
# Write to a database
df.write_database(
table_name="orders_copy",
connection=conn,
)
See the Polars database documentation for more details.
R adbi¶
In R, the adbi package provides a DBI compliant interface to ADBC drivers.
library(DBI)
# Create an SQLite connection via adbi
con <- dbConnect(adbi::adbi(adbcdrivermanager::adbc_driver("sqlite")))
# Write a data.frame to a table in SQLite
dbWriteTable(con, "swiss", datasets::swiss)
# Query it back
dbGetQuery(con, "SELECT * from swiss WHERE Agriculture < 40")
# Take advantage of DBI's Arrow extension API to return results as Arrow (using nanoarrow)
dbGetQueryArrow(con, "SELECT * from swiss WHERE Agriculture < 40")
R dplyr¶
In R, dplyr accesses databases through the DBI interface. The adbcdrivermanager package provides a DBI-compatible backend so you can use any ADBC driver with dplyr and dbplyr.
library(adbi)
library(dplyr)
con <- DBI::dbConnect(
adbi(adbcdrivermanager::adbc_driver("postgresql")),
uri = "postgresql://localhost:5432/mydb"
)
orders <- tbl(con, "orders") |>
filter(status == "shipped") |>
collect()
Ruby Active Record¶
The activerecord-adbc-adapter gem allows you to use ADBC drivers as Active Record database adapters, enabling efficient Arrow-based database interaction for Rails applications.
See the activerecord-adbc-adapter documentation for configuration options.
Add Your Own Here¶
Know of an integratoin or tool not listed here? Contributions to this page are welcome via pull requests on GitHub.