Cheat Sheets

Databricks Cheat Sheet

Quick reference for Databricks — from Delta Lake and PySpark DataFrames to Unity Catalog, MLflow, magic commands, and cluster configuration.

Unify. Engineer. Analyse.

Magic Commands
%sql%python / %scala / %r%fs%sh%run%md
Delta Lake
CREATE TABLE (Delta)MERGE INTO (upsert)Time TravelDESCRIBE HISTORYOPTIMIZEVACUUMRESTORE
PySpark DataFrames
Read dataSelect & filterwithColumnGroupBy & aggregateJoinWindow functionsWrite data
Spark SQL
Run SQLCreate temp viewCREATE TABLE AS SELECT
Unity Catalog
Three-level namespaceCREATE CATALOGGRANT privilegeData lineage
Clusters & Configuration
Cluster typesSpark config (notebook)Adaptive Query Executiondbutils.secrets
MLflow
Start a runAutologgingRegister modelLoad model
Jobs & Workflows
Create job (UI)Task dependenciesdbutils.notebook.run