Skip to main content
Prefect integrations for interacting with Databricks.

Getting started

Prerequisites

Install prefect-databricks

Install or update to the latest version of the prefect-databrickslibrary and dependencies.

List jobs on the Databricks instance

Use with_options to customize options on any existing task or flow

Launch a new cluster and run a Databricks notebook

Notebook named example.ipynb on Databricks which accepts a name parameter:
Prefect flow that launches a new cluster to run example.ipynb:
Note, instead of using the built-in models, you may also input valid JSON. For example, AutoScale(min_workers=1, max_workers=2) is equivalent to {"min_workers": 1, "max_workers": 2}.

Resources

For assistance using Databricks, consult the Databricks documentation. Refer to the prefect-databricks API documentation linked in the sidebar to explore all the capabilities of the prefect-databricks library.