Skip to content

odbc::databricks() fails with new Databricks ODBC driver install path on macOS #993

@gable-grammarly

Description

@gable-grammarly

DBI::dbConnect(odbc::databricks(), ...) fails with the new Databricks ODBC driver (installed from the official site) on macOS. The new driver installs to /Library/databricks/databricksodbc/ rather than the legacy Simba Spark path at /Library/simba/spark/. This is noted in their own documentation that ships along with the installed driver.

See Documentation Screencap Image

Error

Error in file(con, "r") : invalid 'description' argument

Root cause

spark_simba_config() doesn't recognize the new driver path and returns character(0)
for the config file path:

odbc:::spark_simba_config("/Library/databricks/databricksodbc/lib/libdatabricksodbc.dylib"
)
#> $path
#> character(0)
#>
#> $url
#> [1] "https://www.databricks.com/spark/odbc-drivers-download"

configure_simba() then tries to open character(0) as a file, causing the error.

Reproduction

  # odbc 1.6.4.1, macOS 15 (Darwin 25.3.0)
  # Databricks ODBC driver installed at /Library/databricks/databricksodbc/

  DBI::dbConnect(
    odbc::databricks(),
    httpPath = "/sql/1.0/warehouses/example",
    driver = "/Library/databricks/databricksodbc/lib/libdatabricksodbc.dylib"
  )
  #> Error in file(con, "r") : invalid 'description' argument

Workaround

Using odbc::odbc() directly with explicit parameters works:

  DBI::dbConnect(
    odbc::odbc(),
    driver = "/Library/databricks/databricksodbc/lib/libdatabricksodbc.dylib",
    host = Sys.getenv("DATABRICKS_HOST"),
    port = 443,
    AuthMech = 3,
    httpPath = Sys.getenv("DATABRICKS_HTTP_PATH"),
    protocol = "https",
    thriftTransport = 2,
    ssl = 1,
    uid = "token",
    pwd = Sys.getenv("DATABRICKS_TOKEN")
  )

Environment

  • odbc version: 1.6.4.1
  • macOS (Darwin 25.3.0)
  • Driver: Databricks ODBC driver at
    /Library/databricks/databricksodbc/lib/libdatabricksodbc.dylib
  • Driver config: /Library/databricks/databricksodbc/lib/databricks.databricksodbc.ini

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