capabilities.work

Run Job, Wait, Then Export the Notebook

A 3-step recipe with Databricks. We can help you get access.

Recipe · 3 steps

Run Job, Wait, Then Export the Notebook

Run a job to completion, then export the backing notebook.

  1. Trigger an immediate run of the job and capture the run_id.
  2. Read the run and inspect the life cycle state. Loop while RUNNING or PENDING; continue once TERMINATED.
  3. Export the source notebook backing the job in SOURCE format for archival next to the completed run.
What you'll need to have ready
  • job_id: The job to run.
  • notebook_path: The workspace path of the notebook to export afterward.
For your developer

Arazzo workflow databricks:run-job-and-export-notebook, 3 operations: runJobNow → getJobRun → exportWorkspaceObject. Specs on APIs.io.