Databricks notebooks are interactive, multi-language development environments within the Databricks Data Intelligence Platform, designed for collaborative data engineering, analytics, and machine learning workflows. They combine executable code cells with visualizations, markdown documentation, and real-time collaboration features. Unlike traditional Jupyter notebooks, Databricks notebooks provide native integration with Apache Spark, automatic versioning, built-in Git support, serverless compute, and AI-powered coding assistance through Genie Code—making them production-ready tools for both exploratory analysis and automated data pipelines. Understanding magic commands, dbutils, widgets, and the notebook execution model is essential for maximizing productivity.
What This Cheat Sheet Covers
This topic spans 14 focused tables and 153 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Notebook Basics and Cell Types
| Concept | Example | Description |
|---|---|---|
df = spark.read.table("sales")display(df) | • Default cell type that executes code in the notebook's default language (Python, Scala, SQL, or R) • results appear below the cell immediately after execution. | |
Press Shift+Enter | • Executes current cell and automatically moves focus to the next cell • Ctrl+Enter runs cell without advancing• cells execute sequentially by default. | |
display(spark.read.parquet("/data"))display(dbutils.fs.ls("/mnt")) | • Databricks-specific function for enhanced table rendering with built-in chart builder and data profile • triggers visualization options for DataFrames • shows formatted tables for dbutils commands. | |
Click Run All button | • Executes all cells from top to bottom • on DBR 14.0+ runs as a batch workflow and halts on first error • cells with %skip are excluded. | |
display(df) returns interactive table | • Rendered results below cell • supports tables, charts, HTML, images, and text • output persists in IPYNB format when output commits are enabled. | |
%md# Sales ReportData updated: 2026-04-20 | • Creates formatted documentation using Markdown syntax • supports headings, lists, tables, images, and inline code for narrative explanations. |