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
Before using ADBC connections, you need to install the appropriate ADBC driver using the dbc CLI tool (see details here):
# Install drivers for your target databases
dbc install postgresql
dbc install mysql
dbc install trino
dbc install snowflake
# ... etcDrivers are automatically installed to:
macOS:
~/Library/Application Support/ADBC/DriversLinux:
~/.local/share/ADBC/DriversWindows:
%LOCALAPPDATA%\ADBC\Drivers
Sling will automatically discover installed drivers from these locations.
ADBC Driver Manager Installation
If your system does not have the ADBC Driver Manager library installed, you may need to install it manually and set the ADBC_DRIVER_MANAGER_LIB environment variable to point to the library file.
Installation
Using Conda (Recommended):
Using pip:
Finding the Library
Conda path:
$CONDA_PREFIX/lib/libadbc_driver_manager.dylibPip path: Inside your
site-packages/adbc_driver_manager/directorySystem search:
mdfind -name libadbc_driver_manager.dylib
Setting the Environment Variable
Installation
Using apt (Ubuntu/Debian):
Using dnf (RHEL/CentOS/Fedora):
Using Conda:
Using pip:
Finding the Library
Standard paths:
/usr/lib/or/usr/local/lib/Search command:
find /usr -name "libadbc_driver_manager.so*"Conda path:
$CONDA_PREFIX/lib/libadbc_driver_manager.so
Setting the Environment Variable
Installation
Using Conda:
Using pip:
Finding the Library
Conda path:
%CONDA_PREFIX%\Library\bin\adbc_driver_manager.dllPython path:
%USERPROFILE%\AppData\Local\Programs\Python\Python3xx\Lib\site-packages\adbc_driver_manager\ADBC search paths:
%LOCALAPPDATA%\ADBC\Driversor paths inADBC_DRIVER_PATH
Setting the Environment Variable
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 (trueorfalse). Default isfalse.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.
Database-Specific Examples
PostgreSQL with ADBC
ADBC URI format: postgresql://user:password@host:port/database
Official Documentation: Apache ADBC PostgreSQL Driver
MySQL with ADBC
ADBC URI format: user@tcp(host:port)/database
Official Documentation: Apache ADBC MySQL Driver
SQL Server with ADBC
ADBC URI format: mssql://user:password@host:port/database
Official Documentation: Apache ADBC SQL Server Driver
Snowflake with ADBC
ADBC URI format: snowflake://user:password@account/database/schema
Official Documentation: Apache ADBC Snowflake Driver
DuckDB with ADBC
ADBC URI format: duckdb:///path/to/file.db or duckdb://:memory:
Official Documentation: Apache ADBC DuckDB Driver
SQLite with ADBC
ADBC URI format: sqlite:///path/to/file.db
Official Documentation: Apache ADBC SQLite Driver
BigQuery with ADBC
ADBC URI format: bigquery://project
Official Documentation: Apache ADBC BigQuery Driver
Trino with ADBC
ADBC URI format: http://user@host:port?catalog=catalog&schema=schema
Official Documentation: Apache ADBC Trino Driver
Using sling conns
sling connsHere 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], on discord or open a Github Issue here.
Last updated
Was this helpful?