# Databricks Notebook

> A web page in Databricks where you write and run code in small cells.

**Field:** Data Engineering  
**Category:** Platforms  
**Also known as:** Databricks Notebooks

## Think of it like

It is like a lab notebook. You write a step, try it, and see what happened right under it.

## Definition

A Databricks notebook is a web page where you write and run code in small blocks called cells. Each cell shows its result, such as a table or a chart, right below it. One notebook can mix Python, SQL, Scala and R. A line like %sql at the top of a cell switches that cell's language. Several people can edit the same notebook at once. To run, it attaches to compute, and a job can run it on a schedule.

## Example

An analyst loads orders with Python in one cell. In the next cell she switches to SQL and counts orders by country. The chart appears under it.

## Example code

```sql
%sql
SELECT country, COUNT(*) AS orders
FROM main.sales.orders
GROUP BY country
```

One cell. The first line makes it run as SQL, even in a Python notebook.

## Why it matters

It is where most Databricks work starts. Engineers, analysts and data scientists all write in it.

## Common mistake

Running cells out of order while testing. The notebook then works for you but fails when a job runs it from top to bottom.

## Three principles

- **Cells.** Small blocks, each with its result.
- **Many languages.** Python, SQL, Scala and R.
- **Shared.** Several people edit at once.

## Related terms

- [Databricks](https://learn.benibix.com/term/data/databricks)
- [Databricks Compute](https://learn.benibix.com/term/data/databricks-compute)
- [Lakeflow Jobs](https://learn.benibix.com/term/data/lakeflow-jobs)
- [PySpark](https://learn.benibix.com/term/data/pyspark)
- [Apache Spark](https://learn.benibix.com/term/data/apache-spark)
- [Jupyter Notebook](https://learn.benibix.com/term/development/jupyter-notebook)

![On the left, a notebook with three cells, one in Python and one in SQL. In the middle, a job with three tasks in a row: load files, run a pipeline, update a report, started by a clock at 2 AM. At the bottom, two kinds of compute: an all-purpose cluster the notebook attaches to, and job compute that starts for the job and stops when it ends.](https://learn.benibix.com/diagrams/dat3-databricks-work.svg)

---

Source: https://learn.benibix.com/term/data/databricks-notebook
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
