get_run_status: Get the status of a job run on Databricks

View source: R/get_run_status.R

get_run_statusR Documentation

Get the status of a job run on Databricks

Description

Fetches the status of a job run on Databricks, whether it has completed or not. Includes details about start time, cluster spec, task, and more.

Usage

get_run_status(run_id, workspace, token = NULL, verbose = TRUE)

Arguments

run_id

A number representing a valid run id generating by launching a job on Databricks.

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 pretty print the success or failure of the request and add a run_id variable to the R environment. Defaults to TRUE.

Details

The API endpoint for running a job is '2.0/jobs/runs/get'. For all details on API calls please see the official documentation at https://docs.databricks.com/dev-tools/api/latest/.

Value

A list with four elements:

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

  • response_json - The JSON result.

  • response_list - The JSON result transformed into a list.

  • response_df - The JSON result transformed into a dataframe.

Examples

res <- get_run_status(run_id = 2932371,
                      workspace = "https://eastus2.azuredatabricks.net",
                      token = "dapiafoi32984320890d9asaf1")

## Get data in different formats
resjson <- res$response_json
reslist <- res$response_list
res_df <- res$response_df


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