Skip to content

Pin data to a Databricks Volume

Usage

board_databricks(
  folder_url,
  host = NULL,
  prefix = NULL,
  versioned = TRUE,
  cache = NULL
)

Arguments

folder_url

The path to the target folder inside Unity Catalog. The path must include the catalog, schema, and volume names, preceded by 'Volumes/', like "/Volumes/my-catalog/my-schema/my-volume".

host

Your Workspace Instance URL. Defaults to NULL. If NULL, it will search for this URL in two different environment variables, in this order:

  • 'DATABRICKS_HOST'

  • 'CONNECT_DATABRICKS_HOST'

prefix

Prefix within the folder that this board will occupy. You can use this to maintain multiple independent pin boards within a single Databricks Volume. Make sure to end with '/', to take advantage of Databricks Volume directory-like handling.

versioned

Should this board be registered with support for versions?

cache

Cache path. Every board requires a local cache to avoid downloading files multiple times. The default stores in a standard cache location for your operating system, but you can override if needed.

Authentication

board_databricks() searches for an authentication token in three different places, in this order:

  • 'DATABRICKS_TOKEN' environment variable

  • 'CONNECT_DATABRICKS_TOKEN' environment variable

  • OAuth Databricks token inside the RStudio API

In most cases, the authentication will be a Personal Authentication Token ('PAT') that is saved as the 'DATABRICKS_TOKEN' environment variable. To obtain a 'PAT' see: Databricks personal access token authentication.

Details

Examples

if (FALSE) { # \dontrun{
board <- board_databricks("/Volumes/my-catalog/my-schema/my-volume")
board %>% pin_write(mtcars)
board %>% pin_read("mtcars")

# A prefix allows you to have multiple independent boards in the same folder.
project_1 <- board_databricks(
  folder_url = "/Volumes/my-catalog/my-schema/my-volume",
  prefix = "project1/"
)
project_2 <- board_databricks(
  folder_url = "/Volumes/my-catalog/my-schema/my-volume",
  prefix = "project2/"
)
} # }