r-dbi / odbc

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

Read Workbench-managed Databricks credentials from `databricks.cfg` #805

Closed atheriel closed 3 months ago

atheriel commented 3 months ago

Previously odbc::databricks() used .rs.api.getDatabricksToken() to check for Workbench-managed credentials, which only works inside the RStudio console. With this commit we look at the generated config file instead, as we do for Snowflake in odbc::snowflake(). This gives background jobs and, importantly, the Quarto and RMarkdown rendering panes access to these credentials as well.

Unit tests are included.

Closes #803.