r-dbi / odbc

Connect to ODBC databases (using the DBI interface)
https://odbc.r-dbi.org/
Other
387 stars 107 forks source link

type check bug with `databricks(httpPath)` #786

Closed simonpcouch closed 4 months ago

simonpcouch commented 4 months ago

Introduced in #781.

library(DBI)
library(odbc)

con <-
  dbConnect(
    databricks(),
    httpPath = "/sql/1.0/warehouses/<snip>"
  )
#> Error in `.local()`:
#> ! `HTTPPath` must be a single string or `NULL`, not absent.

con <-
  dbConnect(
    databricks(),
    HTTPPath = "/sql/1.0/warehouses/<snip>"
  )
#> Error in `.local()`:
#> ! `httpPath` must be a single string or `NULL`, not absent.

con <-
  dbConnect(
    databricks(),
    httpPath = "/sql/1.0/warehouses/<snip>",
    HTTPPath = "/sql/1.0/warehouses/<snip>"
  )
#> Error in `.local()`:
#> ! Exactly one of `httpPath` or `HTTPPath` must be supplied.

Created on 2024-04-12 with reprex v2.1.0