Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
May 17, 2024

Conversation

atheriel
Copy link
Collaborator

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.

Base automatically changed from aj-fix-db-tests-under-workbench to main May 17, 2024 15:28
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.

Signed-off-by: Aaron Jacobs <aaron.jacobs@rstudio.com>
@atheriel atheriel force-pushed the aj-db-workbench-credentials-from-file branch from bed68e1 to ee39a4b Compare May 17, 2024 15:28
Copy link
Collaborator

@simonpcouch simonpcouch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha, Hadley beat me to it, but looks solid!

@atheriel atheriel merged commit f886f66 into main May 17, 2024
16 checks passed
@atheriel atheriel deleted the aj-db-workbench-credentials-from-file branch May 17, 2024 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

odbc::databricks() does not detect Workbench-managed credentials when rendering Quarto/RMarkdown docs
3 participants