The `dagster-databricks` library provides Dagster ops and resources for interacting with Databricks. This includes resources for connecting to Databricks workspaces and ops for running Databricks jobs (notebooks, JARs, Python scripts) or PySpark jobs. As a Dagster library, its version (currently 0.29.0) is released in lockstep with the core `dagster` library (1.13.0), typically on a weekly or bi-weekly cadence.
pip install dagster-databricksVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to define a Dagster job that uses `dagster-databricks` to execute a Databricks notebook. It sets up the `databricks_resource` using environment variables for host and token, and uses `databricks_op` to specify the notebook task and cluster configuration. To make this runnable, you must set the `DATABRICKS_HOST` and `DATABRICKS_TOKEN` environment variables and provide a valid `notebook_path` that exists in your Databricks workspace.
Always upgrade `dagster` and all `dagster-*` libraries simultaneously to their compatible versions as listed in Dagster release notes or dependency manifests.
Ensure `DATABRICKS_HOST` is the full workspace URL (e.g., `https://dbc-xxxx.cloud.databricks.com`) and `DATABRICKS_TOKEN` is a valid Databricks personal access token with sufficient permissions (e.g., 'Can Manage' for jobs and clusters).
Migrate from `databricks_pyspark_step_launcher` to using `databricks_pyspark_resource` as the primary way to define PySpark jobs within Dagster. Refer to the official documentation for migration guides if applicable.
Consult the official Databricks Jobs API documentation for the exact schema required for job tasks and cluster configurations. Ensure your `databricks_op` parameters mirror this structure precisely.