run_job: Run an existing job on Databricks.

View source: R/run_job.R

run_jobR Documentation

Run an existing job on Databricks.

Description

Takes a job_id and executes it on Databricks. Must create a job first.

Usage

run_job(job_id = NULL, name = NULL, workspace, token = NULL, verbose = T)

Arguments

job_id

A number. Generated by create_job or via the Databricks web interface.

name

Optional. A string representing the name of the job. If multiple jobs share the same name, you'll need to rename the jobs or provide the unique job ID.

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/run-now'. For all details on API calls please see the official documentation at https://docs.databricks.com/dev-tools/api/latest/.

Value

The API response.

Examples

# Run a job
run_job(job_id = 206, workspace = 'https://eastus2.azuredatabricks.net', token = 'dapi1903210980d9a0ads0g9fas')

# Run a job by name
run_job(name = "My Unique Job Name", workspace = workspace, token = token)


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