Databricks is a unified data intelligence platform built on Apache Spark, providing a collaborative environment for data engineering, data science, machine learning, and AI application development. The platform abstracts infrastructure complexity through managed clusters, serverless compute, and interactive notebooks while adding enterprise features like Unity Catalog for centralized governance across data and AI assets, Delta Lake for reliable ACID-transactional storage with UniForm/Iceberg interoperability, Lakeflow for declarative data pipelines and ingestion, Mosaic AI for model serving, vector search, and agent frameworks, Lakebase for PostgreSQL-compatible OLTP workloads, and built-in AI Functions (ai_query, ai_classify, ai_extract, ai_parse_document) that bring LLM capabilities directly into SQL. Understanding Databricks-specific capabilities—from magic commands and widgets to workflows, serverless compute, Declarative Automation Bundles, and predictive optimization—enables practitioners to build production-grade data, analytics, and AI systems efficiently.
What This Cheat Sheet Covers
This topic spans 21 focused tables and 191 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Notebook Magic Commands
| Command | Example | Description |
|---|---|---|
%pythonprint("Hello") | • Switches cell language to Python for the current cell only • useful in multi-language notebooks. | |
%sqlSELECT * FROM catalog.schema.table | • Executes SQL queries directly in a cell • results display as formatted tables and are accessible as the implicit _sqldf DataFrame in Python cells. | |
%scalaval x = 5 | Switches cell language to Scala for Spark operations or JVM interop. | |
%rdf <- data.frame(x=1:5) | Executes R code in the cell for statistical analysis or visualization. | |
%shls -la /Volumes/catalog/schema/vol/ | • Runs shell commands on the driver node • useful for file inspection, debugging, or system-level operations. | |
%fs ls /Volumes/main/default/my-volume/ | Executes DBFS commands (ls, cp, rm, head, etc.) as a shorthand for dbutils.fs syntax. |