Stop spending weeks on boilerplate. This PySpark project template for Databricks gives you medallion architecture, Python packaging, unit + integration + load tests, CI/CD via Declarative Automation Bundles, DQX data quality, and service-principal-based production deploys — all wired together and ready to ship. Whether you're starting a new Databricks ETL project or looking for a reference implementation of production-ready PySpark pipelines, fork this and go.
If this saves you time, a star helps others find it. Let's connect on LinkedIn.
This project template demonstrates how to:
CLAUDE.md and a specs/ folder documenting the project's conventions.scripts folder for examples.system.billing.usage).Deep technical detail lives in specs/ (the README stays a landing page):
Agentic development: - Claude Code: 5 Essentials for Data Engineering - Mastering Claude Code in 30 minutes - Introducing Databricks AI Dev Kit - Skills, MCP server, Builder App
Debates on the use of notebooks vs. Python packaging: - The Rise of The Notebook Engineer - Please don’t make me use Databricks notebooks - this Linkedin thread by Daniel Beach - this Linkedin thread by Ryan Chynoweth - this Linkedin thread by Jaco van Gelder
Sessions on Databricks Declarative Automation Bundles, CI/CD, and Software Development Life Cycle at Data + AI Summit 2025: - CI/CD for Databricks: Advanced Asset Bundles and GitHub Actions - Deploying Databricks Asset Bundles (DABs) at Scale - A Prescription for Success: Leveraging DABs for Faster Deployment and Better Patient Outcomes
Other resources: - Goodbye Pip and Poetry. Why UV Might Be All You Need - The Spark Revolution You Didn’t See Coming: How Apache Spark 4.0 in Databricks Just Changed Everything
1) (Optional) Install Databricks AI Dev Kit and Claude Code.
2) Create a Databricks Free Edition workspace.
3) Install and configure the Databricks CLI on your local machine. Check the current version in databricks.yml. Follow the instructions here.
4) Set up the Python environment and run unit tests on your local machine.
make sync && make unit-test
5) Initialize the workspace. Create an external location in Databricks and update the storage-root parameter in the Makefile. This step will create the catalogs, schemas, service principal, and the required grants. For more details, see Overview of external locations. Then
run:
make init
6) Generate a secret for the service principal. In Databricks, go to: Workspace -> Settings -> Identity and access -> Service principals -> Secrets. Generate a new secret for your service principal and update the corresponding profiles in your .databrickscfg file. Your configuration should look similar to this:
[dev]
host = https://xxxx.cloud.databricks.com/
token = bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
[staging]
host = https://xxxx.cloud.databricks.com/
client_id = yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
client_secret = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
[prod]
host = https://xxxx.cloud.databricks.com/
client_id = yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
client_secret = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
7) Deploy and execute on the dev workspace.
make deploy env=dev
8) Configure CI/CD automation with the service principal ID and secret. Configure GitHub Actions repository secrets (DATABRICKS_HOST, DATABRICKS_PRINCIPAL_ID, DATABRICKS_SECRET).
9) (Optional) You can also execute unit tests from your preferred IDE. Here's a screenshot from VS Code with Microsoft's Python extension installed.

Licensed under the Apache License 2.0. See LICENSE and NOTICE.
$ claude mcp add databricks-template \
-- python -m otcore.mcp_server <graph>