Skip to content

renardeinside/dabs-with-uv

Repository files navigation

Databricks Asset Bundles Example with uv

This project shows an example of a Python project that uses uv for dependency management and Databricks Asset Bundles for deployment.

Local development

Prerequisites:

  • Python 3.9+
  • uv
  • Databricks CLI
  • Databricks workspace with Unity Catalog and Serverless enabled

Steps:

  1. Clone the repository
  2. Setup the uv env:
uv sync

Running tests from local machine

Add the DATABRICKS_CONFIG_PROFILE environment variable to your .env file:

DATABRICKS_CONFIG_PROFILE=<your-profile-name>

Then, run the tests via pytest:

pytest

Deployment

To deploy the app, login to your Databricks workspace from Databricks CLI:

databricks auth login 

Deploy the workflow:

databricks bundle deploy --var="catalog=your_catalog" --var="schema=default" -t dev

Tech used

  • Databricks Asset Bundles - The tool to create, manage, and deploy Databricks Workflows
  • uv - An extremely fast Python package and project manager, written in Rust
  • hatch-vcs - Plugin that uses your preferred version control system (like Git) to determine project versions
  • pydantic - data validation library for Python

About

Example Python project that uses uv for dependency management and Databricks Asset Bundles for deployment.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages