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
with Azure Databricks
Import a notebook into the workspace, confirm it, and run it.
- Import the base64-encoded notebook content to the target path in SOURCE format, overwriting any existing object.
- Confirm the imported object exists at the path and is a NOTEBOOK before attempting to run it.
- Submit a one-time run of the imported notebook on the existing cluster and capture the run_id.
- 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.