mcpField
A
adbc

adbc

github.com/columnar-techData & databases837 installsUpdated 16w ago
Repository

About adbc

adbc is a skill for using the `dbc` command-line tool to find and install ADBC database drivers. It also points developers to language- and database-specific connection guidance, while noting that a driver may not exist for a chosen database.

Key features

  1. 01Search available ADBC drivers
  2. 02Install drivers with `dbc`
  3. 03Find examples by programming language
  4. 04Find driver guidance by database
  5. 05Use TOML connection profiles

Use cases

  1. 01Find an ADBC driver for a database
  2. 02Install a driver for Python or another language
  3. 03Reuse connection settings across environments
  4. 04Keep credentials out of application code

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/columnar-tech/skills --skill adbc

After installing, type/adbcin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

resources/
connection-profiles.md
resources/drivers/
duckdb.md
flightsql.md
mysql.md
postgresql.md
snowflake.md
sqlite.md
resources/languages/
cpp.md
go.md
javascript.md
python.md
r.md
rust.md

Details

From the project README

Find a driver for a database

Use the dbc command line tool to find available drivers for a database. It's possible no driver may exist for the user's database of choice as not all databases have ADBC drivers.

Install dbc

If the user does not have dbc available, try to install it for them.

Prefer installing it with these commands, in order of preference, if the tool is available:

  • If uv is available: uv tool install dbc
  • If pipx is available: pipx install dbc
  • If brew is available: brew install columnar-tech/tap/dbc
  • On Windows, if winget is available: winget install dbc
  • Otherwise, direct the user to the installation docs: https://docs.columnar.tech/dbc/getting_started/installation/
Search for a driver
dbc search
Install a driver

Install a driver by running dbc install <DRIVER>. This is idempotent — if the driver is already installed, it is a no-op that simply reports the existing installation — so there is no need to check first before running it. Prefer to install drivers using dbc over installing driver packages from PyPI or Conda Forge.

For anything beyond a one-shot dbc install <DRIVER> — reproducible dbc.toml / dbc sync workflows, version pinning, or any other dbc subcommand — invoke the dbc skill rather than guessing at commands. In particular, note that there is no dbc list command.

Referring to drivers

Refer to drivers by their dbc short name and avoid specifying drivers with absolute paths.

Example: After running dbc install sqlite, refer to that driver as sqlite. For example:

from adbc_driver_manager import dbapi
dbapi.connect(driver="sqlite", db_kwargs={"uri": "foo.db"})

Don't use dbc info to find where drivers are installed and find their absolute paths on disk.

Programming Language

See the resources below depending on which language or languages the user wants to use:

  • C++: resources/languages/cpp.md
  • Go: resources/languages/go.md
  • JavaScript: resources/languages/javascript.md
  • Python: resources/languages/python.md
  • R: resources/languages/r.md
  • Rust: resources/languages/rust.md

Prefer any language the user has already said they're using or can use. Each of these examples use the "sqlite" driver, connect to an in-memory database, and load a "penguins.parquet" file. This is done just for explanatory purposes and the code should be adapted to the user's problem.

Using a Driver

See the resources below depending on which database the user wants to use:

  • DuckDB: resources/drivers/duckdb.md
  • FlightSQL: resources/drivers/flightsql.md
  • MySQL: resources/drivers/mysql.md
  • PostgreSQL: resources/drivers/postgresql.md
  • Snowflake: resources/drivers/snowflake.md
  • SQLite: resources/drivers/sqlite.md

Connection Profiles

Connection profiles are TOML files that store a driver name and connection options, referenced by a profile://profile_name URI. They decouple credentials and environment-specific config from application code.

Suggest connection profiles when the user:

  • Has multiple environments (dev/staging/prod) to switch between
  • Wants to keep credentials out of source code
  • Wants a shared, reusable connection config

All language bindings that wrap the C++ or Rust driver manager support connection profiles, including Python, Go, R, Java, GLib/Ruby, C++, and Rust. JavaScript (@apache-arrow/adbc-driver-manager) also supports connection profiles via the profileSearchPaths option.

See resources/connection-profiles.md for the TOML format, file locations, and environment variable substitution syntax. See the relevant language resource for the binding-specific API.

More Resources

Comments

Markdown supported