Skip to content

Implement an ADBC backend #1787

@hadley

Description

@hadley

There are two ways of installing adbc drivers:

  • Wrapped in R packages, e.g. pak::pak("adbcsqlite")
  • Using dbc, e.g. dbc install sqlite

Then you can generate an DBI compatible connection with adbi:

con1 <- DBI::dbConnect(adbi::adbi("adbcsqlite"), uri = ":memory:")
con2 <- DBI::dbConnect(adbi::adbi(adbcdrivermanager::adbc_driver("sqlite")), uri = ":memory:")

It'll be easiest to test with adbcsqlite since that keeps everything in R package space, even though we probably expect most people will use dbc in practice.

@ianmcook supplied this translation of driver names to SQL dialects that would be a good place:

bigquery: bigquery
duckdb: duckdb
dremio: flightsql
gizmosql: flightsql
starrocks: flightsql
mssql: mssql
mariadb: mysql
mysql: mysql
tidb: mysql
vitess: mysql
cedardb: postgresql
citus: postgresql
cockroachdb: postgresql
cratedb: postgresql
neon: postgresql
paradedb: postgresql
postgresql: postgresql
timescaledb: postgresql
yellowbrick: postgresql
yugabytedb: postgresql
redshift: redshift
snowflake: snowflake
sqlite: sqlite
trino: trino

We're currently missing some way to reliably extract the driver name from the connection. @eitsupi suggested con@database$driver$name, but that doesn't work for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions