get_library_statuses: Get the status of libraries on Databricks clusters

View source: R/get_library_statuses.R

get_library_statusesR Documentation

Get the status of libraries on Databricks clusters

Description

Get a list of libraries and their statuses for Databricks clusters.

Usage

get_library_statuses(
  cluster_id = NULL,
  workspace,
  token = NULL,
  verbose = T,
  ...
)

Arguments

cluster_id

A string containing the unique id for an online Databricks cluster

workspace

A string representing the web workspace of your Databricks instance. E.g., "https://eastus2.azuredatabricks.net" or "https://demo.cloud.databricks.com".

token

A valid authentication token generated via User Settings in Databricks or via the Databricks REST API 2.0. If none is provided, netrc will be used

verbose

If TRUE, will print the API response to the console. Defaults to FALSE.

...

Additional options to be passed

Details

By default will return library statuses for *all* clusters. If a 'cluster_id' is supplied, will return the status for that cluster alone. You can locate the cluster ID in the URL of the cluster configuration page. For example:

https://mycompany.cloud.databricks.com/#/setting/clusters/xxxx-xxxxx-xxxxxx/

Where xxxx-xxxxx-xxxxxx is the cluster ID.

The API endpoints for getting library statuses are '2.0/libraries/all-cluster-statuses' and '2.0/libraries/cluster-status'. For all details on API calls please see the official documentation at https://docs.databricks.com/dev-tools/api/latest/.

Value

A list with three elements:

  • response - The full API response, including status code.

  • response_list - The JSON result transformed into a list.

  • response_df - The JSON result transformed into a dataframe.

If the details of jobs are not needed, use the response_tidy dataframe.

Examples

# For all clusters
library_statuses <- get_library_statuses(workspace = workspace)

# For a single cluster
cluster_id <- "0818-155203-cheese22"
library_statuses <- get_library_statuses(cluster_id = cluster_id, workspace = workspace)

RafiKurlansik/bricksteR documentation built on Oct. 13, 2022, 6:58 a.m.