| name | databricks-local-dev-loop |
| description | Configure Databricks local development with Databricks Connect, Asset Bundles, and IDE.
Use when setting up a local dev environment, configuring test workflows,
or establishing a fast iteration cycle with Databricks.
Trigger with phrases like "databricks dev setup", "databricks local",
"databricks IDE", "develop with databricks", "databricks connect".
|
| allowed-tools | Read, Write, Edit, Bash(pip:*), Bash(databricks:*), Grep |
| version | 1.0.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| compatible-with | claude-code, codex, openclaw |
| tags | ["saas","databricks","testing","workflow"] |
Databricks Local Dev Loop
Overview
Set up a fast local development workflow using Databricks Connect v2, Asset Bundles, and VS Code. Databricks Connect lets you run PySpark code locally while executing on a remote Databricks cluster, giving you IDE debugging, fast iteration, and proper test isolation.
Prerequisites
- Completed
databricks-install-auth setup
- Python 3.10+ (must match cluster's Python version)
- A running Databricks cluster (DBR 13.3 LTS+)
- VS Code or PyCharm
Instructions
Step 1: Project Structure
my-databricks-project/
├── src/
│ ├── __init__.py
│ ├── pipelines/
│ │ ├── __init__.py
│ │ ├── bronze.py # Raw ingestion
│ │ ├── silver.py # Cleansing transforms
│ │ └── gold.py # Business aggregations
│ └── utils/
│ ├── __init__.py
│ └── helpers.py
├── tests/
│ ├── conftest.py # Spark fixtures
│ ├── unit/
│ │ └── test_transforms.py # Local Spark tests
│ └── integration/
│ └── test_pipeline.py # Databricks Connect tests
├── notebooks/
│ └── exploration.py
├── resources/
│ └── daily_etl.yml # Job resource definitions
├── databricks.yml # Asset Bundle root config
├── pyproject.toml
└── requirements.txt
Step 2: Install Development Tools
set -euo pipefail
python -m venv .venv && source .venv/bin/activate
pip install "databricks-connect==14.3.*"
pip install databricks-sdk
pip install pytest pytest-cov
databricks-connect test
Step 3: Configure Databricks Connect
Databricks Connect v2 reads from standard SDK auth (env vars, ~/.databrickscfg, or DATABRICKS_CLUSTER_ID).
export DATABRICKS_HOST="https://adb-1234567890123456.7.azuredatabricks.net"
export DATABRICKS_TOKEN="dapi..."
export DATABRICKS_CLUSTER_ID=