Skip to content

Add Databricks support for service principals when running in Posit Connect with connectcreds#931

Merged
atheriel merged 1 commit intor-dbi:mainfrom
tnederlof:connectcreds-serviceaccount
Apr 30, 2026
Merged

Add Databricks support for service principals when running in Posit Connect with connectcreds#931
atheriel merged 1 commit intor-dbi:mainfrom
tnederlof:connectcreds-serviceaccount

Conversation

@tnederlof
Copy link
Copy Markdown
Contributor

@tnederlof tnederlof commented Jul 11, 2025

CANNOT MERGE until connectcreds release

This commit adds support for service principal credentials managed by
Posit Connect alongside our existing support of viewer-based
credentials. The meat of this is handled by the connectcreds package.

Documentation and unit test updates are included.

Addresses: #930

@atheriel atheriel self-assigned this Aug 21, 2025
@atheriel atheriel force-pushed the connectcreds-serviceaccount branch from 4103d9f to 288ec4c Compare August 21, 2025 16:21
@atheriel
Copy link
Copy Markdown
Collaborator

I backed out the formatting-only changes from this and squashed + rebased the commits. I also set the Remote so that we pick up on the dev version of the package, which should allow CI to pass.

@simonpcouch
Copy link
Copy Markdown
Collaborator

Thank you!! Do yall want to see this change going in the odbc release to be submitted early next week? If so, on what timeline would you imagine connectcreds would be submitted to CRAN?

Comment thread R/driver-databricks.R
@atheriel
Copy link
Copy Markdown
Collaborator

@simonpcouch We haven't been able to get it to work yet, so I'd say no, don't hold up the release.

@atheriel atheriel force-pushed the connectcreds-serviceaccount branch from 288ec4c to a6ea354 Compare April 30, 2026 13:50
@atheriel atheriel marked this pull request as ready for review April 30, 2026 13:51
@atheriel atheriel requested a review from simonpcouch April 30, 2026 15:10
Copy link
Copy Markdown
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.

Thank you!

Comment thread R/driver-databricks.R Outdated
Comment thread R/driver-databricks.R
#' server <- function(input, output, session) {
#' conn <- DBI::dbConnect(
#' odbc::databricks(),
#' workspace = "https://example.cloud.databricks.com",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Would it make sense to add this same example parameter to the first dbConnect example here? Or it uniquely applicable inside the Shiny server?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We detect the workspace parameter automatically in most cases, so this is really just a way to show how you'd override it if necessary.

This commit adds support for service principal credentials managed by
Posit Connect alongside our existing support of viewer-based
credentials. The meat of this is handled by the `connectcreds` package.

Documentation and unit test updates are included.

Co-authored-by: Aaroon Jacobs <aaron.jacobs@posit.co>
Signed-off-by: Aaron Jacobs <aaron.jacobs@posit.co>
@atheriel atheriel force-pushed the connectcreds-serviceaccount branch from 0049661 to 2696845 Compare April 30, 2026 20:15
@atheriel atheriel merged commit 212e6c6 into r-dbi:main Apr 30, 2026
18 checks passed
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.

3 participants