run_job | R Documentation |
Takes a job_id and executes it on Databricks. Must create a job first.
run_job(job_id = NULL, name = NULL, workspace, token = NULL, verbose = T)
job_id |
A number. Generated by |
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. |
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/.
The API response.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.