Create a Job and Run It to Completion
A 4-step recipe with Azure Databricks. We can help you get access.
Recipe · 4 steps
Create a Job and Run It to Completion
with Azure Databricks
Create a notebook job, run it now, and wait for the run to finish.
- Create a job containing a single notebook task bound to an existing cluster. The canonical job_id is returned.
- Trigger an immediate run of the newly created job and capture the run_id for polling.
- Retrieve the run state. Repeat until the run life_cycle_state is TERMINATED, then branch on the result_state.
- Retrieve the notebook output for the successful run, capturing the value passed to dbutils.notebook.exit().
What you'll need to have ready
- token: Databricks personal access token for the Authorization header.
- jobName: Name for the new job.
- taskKey: Unique key identifying the single task within the job.
- notebookPath: Absolute workspace path of the notebook to run.
- existingClusterId: Id of an existing all-purpose cluster to run the task on.
For your developer
Arazzo workflow microsoft-azure-databricks:create-job-and-run, 4 operations: createJob → runJobNow → getJobRun → getJobRunOutput. Specs on APIs.io.