Interface JobsService
-
@Generated public interface JobsService
The Jobs API allows you to create, edit, and delete jobs.You can use a Databricks job to run a data processing or data analysis task in a Databricks cluster with scalable resources. Your job can consist of a single task or can be a large, multi-task workflow with complex dependencies. Databricks manages the task orchestration, cluster management, monitoring, and error reporting for all of your jobs. You can run your jobs immediately or periodically through an easy-to-use scheduling system. You can implement job tasks using notebooks, JARS, Delta Live Tables pipelines, or Python, Scala, Spark submit, and Java applications.
You should never hard code secrets or store them in plain text. Use the [Secrets CLI] to manage secrets in the [Databricks CLI]. Use the [Secrets utility] to reference secrets in notebooks and jobs.
[Databricks CLI]: https://docs.databricks.com/dev-tools/cli/index.html [Secrets CLI]: https://docs.databricks.com/dev-tools/cli/secrets-cli.html [Secrets utility]: https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-secrets
This is the high-level interface, that contains generated methods.
Evolving: this interface is under development. Method signatures may change.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcancelAllRuns(CancelAllRuns cancelAllRuns)Cancel all runs of a job.voidcancelRun(CancelRun cancelRun)Cancel a job run.CreateResponsecreate(CreateJob createJob)Create a new job.voiddelete(DeleteJob deleteJob)Delete a job.voiddeleteRun(DeleteRun deleteRun)Delete a job run.ExportRunOutputexportRun(ExportRunRequest exportRunRequest)Export and retrieve a job run.Jobget(GetJobRequest getJobRequest)Get a single job.RungetRun(GetRunRequest getRunRequest)Get a single job run.RunOutputgetRunOutput(GetRunOutputRequest getRunOutputRequest)Get the output for a single run.ListJobsResponselist(ListJobsRequest listJobsRequest)List jobs.ListRunsResponselistRuns(ListRunsRequest listRunsRequest)List job runs.RepairRunResponserepairRun(RepairRun repairRun)Repair a job run.voidreset(ResetJob resetJob)Overwrites all settings for a job.RunNowResponserunNow(RunNow runNow)Trigger a new job run.SubmitRunResponsesubmit(SubmitRun submitRun)Create and trigger a one-time run.voidupdate(UpdateJob updateJob)Partially update a job.
-
-
-
Method Detail
-
cancelAllRuns
void cancelAllRuns(CancelAllRuns cancelAllRuns)
Cancel all runs of a job.Cancels all active runs of a job. The runs are canceled asynchronously, so it doesn't prevent new runs from being started.
-
cancelRun
void cancelRun(CancelRun cancelRun)
Cancel a job run.Cancels a job run. The run is canceled asynchronously, so it may still be running when this request completes.
-
create
CreateResponse create(CreateJob createJob)
Create a new job.Create a new job.
-
delete
void delete(DeleteJob deleteJob)
Delete a job.Deletes a job.
-
deleteRun
void deleteRun(DeleteRun deleteRun)
Delete a job run.Deletes a non-active run. Returns an error if the run is active.
-
exportRun
ExportRunOutput exportRun(ExportRunRequest exportRunRequest)
Export and retrieve a job run.Export and retrieve the job run task.
-
get
Job get(GetJobRequest getJobRequest)
Get a single job.Retrieves the details for a single job.
-
getRun
Run getRun(GetRunRequest getRunRequest)
Get a single job run.Retrieve the metadata of a run.
-
getRunOutput
RunOutput getRunOutput(GetRunOutputRequest getRunOutputRequest)
Get the output for a single run.Retrieve the output and metadata of a single task run. When a notebook task returns a value through the `dbutils.notebook.exit()` call, you can use this endpoint to retrieve that value. Databricks restricts this API to returning the first 5 MB of the output. To return a larger result, you can store job results in a cloud storage service.
This endpoint validates that the __run_id__ parameter is valid and returns an HTTP status code 400 if the __run_id__ parameter is invalid. Runs are automatically removed after 60 days. If you to want to reference them beyond 60 days, you must save old run results before they expire.
-
list
ListJobsResponse list(ListJobsRequest listJobsRequest)
List jobs.Retrieves a list of jobs.
-
listRuns
ListRunsResponse listRuns(ListRunsRequest listRunsRequest)
List job runs.List runs in descending order by start time.
-
repairRun
RepairRunResponse repairRun(RepairRun repairRun)
Repair a job run.Re-run one or more tasks. Tasks are re-run as part of the original job run. They use the current job and task settings, and can be viewed in the history for the original job run.
-
reset
void reset(ResetJob resetJob)
Overwrites all settings for a job.Overwrites all the settings for a specific job. Use the Update endpoint to update job settings partially.
-
runNow
RunNowResponse runNow(RunNow runNow)
Trigger a new job run.Run a job and return the `run_id` of the triggered run.
-
submit
SubmitRunResponse submit(SubmitRun submitRun)
Create and trigger a one-time run.Submit a one-time run. This endpoint allows you to submit a workload directly without creating a job. Runs submitted using this endpoint don’t display in the UI. Use the `jobs/runs/get` API to check the run state after the job is submitted.
-
update
void update(UpdateJob updateJob)
Partially update a job.Add, update, or remove specific settings of an existing job. Use the ResetJob to overwrite all job settings.
-
-