db_host: Generate/Fetch Databricks Host

View source: R/package-auth.R

db_hostR Documentation

Generate/Fetch Databricks Host

Description

If both id and prefix are NULL then the function will check for the DATABRICKS_HOST environment variable. .databrickscfg will be searched if db_profile and use_databrickscfg are set or if Posit Workbench managed OAuth credentials are detected.

When defining id and prefix you do not need to specify the whole URL. E.g. ⁠https://<prefix>.<id>.cloud.databricks.com/⁠ is the form to follow.

Usage

db_host(id = NULL, prefix = NULL, profile = default_config_profile())

Arguments

id

The workspace string

prefix

Workspace prefix

profile

Profile to use when fetching from environment variable (e.g. .Renviron) or .databricksfg file

Details

The behaviour is subject to change depending if db_profile and use_databrickscfg options are set.

  • use_databrickscfg: Boolean (default: FALSE), determines if credentials are fetched from profile of .databrickscfg or .Renviron

  • db_profile: String (default: NULL), determines profile used. .databrickscfg will automatically be used when Posit Workbench managed OAuth credentials are detected.

See vignette on authentication for more details.

Value

workspace URL

See Also

Other Databricks Authentication Helpers: db_read_netrc(), db_token(), db_wsid()


brickster documentation built on April 12, 2025, 1:21 a.m.