capabilities.work

Import a Notebook and Run It

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

Recipe · 4 steps

Import a Notebook and Run It

Import a notebook into the workspace, confirm it, and run it.

  1. Import the base64-encoded notebook content to the target path in SOURCE format, overwriting any existing object.
  2. Confirm the imported object exists at the path and is a NOTEBOOK before attempting to run it.
  3. Submit a one-time run of the imported notebook on the existing cluster and capture the run_id.
  4. Retrieve the run state. Repeat until the run life_cycle_state is TERMINATED, then end with the final result_state.
What you'll need to have ready
  • token: Databricks personal access token for the Authorization header.
  • notebookPath: Absolute workspace path to import the notebook to.
  • content: Base64-encoded notebook source content (max 10 MB).
  • language: Notebook language, one of SCALA, PYTHON, SQL, or R.
  • taskKey: Unique key identifying the single task in the run.
  • existingClusterId: Id of an existing cluster to run the imported notebook on.
For your developer

Arazzo workflow microsoft-azure-databricks:import-notebook-and-run, 4 operations: importWorkspaceObject → getWorkspaceObjectStatus → submitRun → getJobRun. Specs on APIs.io.