Best practices in Databricks

Databricks is a unified analytics platform providing cloud-based services for big data and machine learning. This guide outlines best practices to optimize Databricks performance, enhance collaboration, and ensure security across performance & cost, data engineering, governance, and generative AI.

Last updated: December 2025

Performance & cost optimization

Use automatic Liquid Clustering

Replace traditional partitioning and Z-Ordering with Liquid Clustering. It automatically adjusts data layout based on query patterns, solving the small-files problem and improving query performance without manual tuning.

Adopt Serverless compute

Use Serverless SQL Warehouses and Serverless Jobs to eliminate idle time and infrastructure management. Serverless compute scales instantly and charges only for the seconds used.

Enable Predictive Optimization

For Unity Catalog managed tables, enable Predictive Optimization to automatically run maintenance operations like OPTIMIZE and VACUUM at the optimal time.

Data engineering & development

Databricks Asset Bundles (DABs)

Use Databricks Asset Bundles for Infrastructure as Code (IaC) and CI/CD. DABs let you define jobs, pipelines, and infrastructure in YAML and deploy them consistently across Dev, Staging, and Prod.

Lakeflow Declarative Pipelines

Leverage Lakeflow (Delta Live Tables) to build reliable ETL pipelines. Define data transformations declaratively and let Databricks handle orchestration, error handling, and auto-scaling.

Version control with Git

Integrate Databricks Repos with your Git provider (GitHub, Azure DevOps) to enable branch-based development, code reviews, and version history for notebooks and code.

Governance & security

Unity Catalog

Centralize access control, auditing, and data discovery with Unity Catalog. It provides a unified governance layer for all data and AI assets (tables, files, models) across workspaces.

Attribute-Based Access Control (ABAC)

Implement ABAC to create scalable access policies based on tags (e.g., PII, Confidential) rather than managing permissions for individual users and tables.

Databricks Clean Rooms

Use Clean Rooms for secure collaboration with external partners. Share data and run joint analyses without exposing the underlying raw data or moving it out of your environment.

Generative AI

Mosaic AI Agent Framework

Build and deploy production-grade GenAI agents using the Mosaic AI Agent Framework. It provides tools for evaluation, tracing, and deployment of LLM applications.

Vector Search

Use Mosaic AI Vector Search to build RAG (Retrieval Augmented Generation) applications. It automatically syncs your Delta tables to a vector index for fast semantic search.

References

Want a tailored review for your environment? MAQ Software's team can help.

Talk to our team
Databricks Best Practice Guide

Databricks Best Practice Guide

Improve job speed and reduce storage costs with our Databricks optimization best practices.

Read More