capabilities.work

Run Job and Branch on Success or Failure

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

Recipe · 4 steps

Run Job and Branch on Success or Failure

Run a job and branch on SUCCESS vs failure to fetch output.

  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; once TERMINATED branch on the result state.
  3. Retrieve the notebook result of the successful run.
  4. Retrieve the error and stack trace of the failed run for diagnosis.
What you'll need to have ready
  • job_id: The job to run.
  • notebook_params: Optional notebook parameters for the run.
For your developer

Arazzo workflow databricks:run-job-branch-on-result, 4 operations: runJobNow → getJobRun → getJobRunOutput → getJobRunOutput. Specs on APIs.io.