ADBC (Arrow)

Connect & Ingest data from / to multiple databases via Arrow Database Connectivity (ADBC)

Arrow Database Connectivity (ADBC) provides a standardized interface for accessing various databases using the Apache Arrow columnar format. ADBC enables efficient, high-performance data movement with zero-copy semantics and native Arrow support (v1.5.2+)

Supported Database Types

Sling supports the following databases via ADBC drivers:

  • PostgreSQL - Full support via ADBC PostgreSQL driver

  • MySQL - Support via ADBC MySQL driver (v9.4+)

  • SQL Server - Full support via ADBC SQL Server driver

  • Snowflake - Full support via ADBC Snowflake driver

  • SQLite - Support via ADBC SQLite driver

  • DuckDB - Full support via ADBC DuckDB driver

  • BigQuery - Full support via ADBC BigQuery driver

  • Trino - Support via ADBC Trino driver (v4.0+)

Setup

Using ADBC requires two components:

  1. ADBC Driver Manager — a shared library (libadbc_driver_manager.so / .dylib / .dll) that loads and manages drivers

  2. Database Driver — the native ADBC driver for your specific database (e.g., DuckDB, PostgreSQL)

Step 1: Install the ADBC Driver Manager

The driver manager is a shared library that Sling loads at runtime. You must install it before using any ADBC connection.

Using Conda (recommended):

Or with Homebrew + Conda:

The library is installed to your conda environment's lib/ directory (e.g., ~/mambaforge/lib/libadbc_driver_manager.dylib). Sling auto-detects common conda paths.

circle-info

Sling auto-detects the driver manager from common installation paths. If it cannot find the library, you can set the ADBC_DRIVER_MANAGER_LIB environment variable to the full path:

Step 2: Install the Database Driver

Install the native ADBC driver for your target database using the dbc CLI toolarrow-up-right:

Then install drivers for your target databases:

Drivers are installed to:

  • macOS: ~/Library/Application Support/ADBC/Drivers/

  • Linux: ~/.config/adbc/drivers/

  • Windows: %APPDATA%\adbc\drivers\

Sling auto-discovers installed drivers from these locations.

Quick Start Example (DuckDB)

Here is a complete example from scratch on macOS:

And on Linux (amd64):

Manual Driver Installation

If you prefer not to use dbc, you can install ADBC driver libraries manually:

Driver Discovery

Sling searches for ADBC driver libraries automatically in the following order:

  1. Explicit driver property in the connection configuration

  2. ADBC_DRIVER_PATH environment variable — additional directories to search (colon-separated on Unix, semicolon-separated on Windows)

  3. Standard installation paths:

Platform
Paths

macOS

~/Library/Application Support/ADBC/Drivers, ~/.dbc/drivers, /usr/local/lib, /opt/homebrew/lib

Linux

~/.local/share/ADBC/Drivers, ~/.config/adbc/drivers, ~/.dbc/drivers, /usr/lib, /usr/local/lib

Windows

%LOCALAPPDATA%\ADBC\Drivers, ~/.dbc/drivers, %ProgramFiles%\ADBC\lib

Sling looks for driver files matching *{driver_name}* (e.g., libduckdb.so, libadbc_driver_postgresql.dylib).

If the driver is in a non-standard location, you can either set ADBC_DRIVER_PATH or specify the full path directly in your connection:

Enabling ADBC on Connections

To use ADBC with your existing database connections, simply add use_adbc: true to your connection configuration. This allows you to keep your original connection properties and format while enabling ADBC's high-performance data transfer.

Connection Properties

The following ADBC-specific properties can be added to any supported database connection:

  • use_adbc (optional) -> Enable ADBC driver for this connection (true or false). Default is false.

  • adbc_uri (optional) -> Override the automatically constructed ADBC URI. Sling automatically builds the ADBC URI from your connection properties, but you can specify a custom URI if needed.

  • driver (optional) -> Explicit path to the ADBC driver library file (e.g., /usr/local/lib/libadbc_driver_postgresql.dylib). If not set, Sling auto-discovers the driver.

Troubleshooting

"failed to load ADBC driver manager library"

This means the driver manager shared library is not installed or cannot be found.

Fix: Install the driver manager (see Step 1 above), or set the ADBC_DRIVER_MANAGER_LIB environment variable to the full path of the library.

"Must provide 'driver' parameter"

This means Sling cannot find the database-specific ADBC driver (e.g., the DuckDB or PostgreSQL driver).

Fix: Install the driver with dbc install <driver_name>, or set ADBC_DRIVER_PATH to the directory containing the driver, or set the driver property in your connection config.

Windows: driver not found after dbc install

On Windows, dbc installs drivers to %APPDATA%\adbc\drivers\ (Roaming), but Sling may search %LOCALAPPDATA% (Local). Set ADBC_DRIVER_PATH to the correct directory:

Or specify the driver path directly in your connection:

Database-Specific Examples

PostgreSQL with ADBC

ADBC URI format: postgresql://user:password@host:port/database

Official Documentation: Apache ADBC PostgreSQL Driverarrow-up-right

MySQL with ADBC

ADBC URI format: user@tcp(host:port)/database

Official Documentation: Apache ADBC MySQL Driverarrow-up-right

SQL Server with ADBC

ADBC URI format: mssql://user:password@host:port/database

Official Documentation: Apache ADBC SQL Server Driverarrow-up-right

Snowflake with ADBC

ADBC URI format: snowflake://user:password@account/database/schema

Official Documentation: Apache ADBC Snowflake Driverarrow-up-right

DuckDB with ADBC

ADBC URI format: duckdb:///path/to/file.db or duckdb://:memory:

Official Documentation: Apache ADBC DuckDB Driverarrow-up-right

SQLite with ADBC

ADBC URI format: sqlite:///path/to/file.db

Official Documentation: Apache ADBC SQLite Driverarrow-up-right

BigQuery with ADBC

ADBC URI format: bigquery://project

Official Documentation: Apache ADBC BigQuery Driverarrow-up-right

Trino with ADBC

ADBC URI format: http://user@host:port?catalog=catalog&schema=schema

Official Documentation: Apache ADBC Trino Driverarrow-up-right

Using sling conns

Here are examples of enabling ADBC on existing connections:

Environment Variable

Sling Env File YAML

See here to learn more about the sling env.yaml file.

Additional Resources

If you are facing issues connecting, please reach out to us at [email protected]envelope, on discordarrow-up-right or open a Github Issue herearrow-up-right.

Last updated

Was this helpful?