Create a notebook by right-clicking a Workspace folder and selecting Create > Notebook, using Create within a folder, or selecting + New > Notebook in the navigation sidebar.
+ New creates the notebook in your default home folder; creating it within a folder places it there directly.
Click the notebook title to rename it.
Use the compute selector in the upper-right corner to attach a cluster or SQL warehouse. In Free Edition, only serverless compute is available and starts automatically when you run a cell.
If notebook tabs are enabled in Settings, notebooks open in separate tabs that can be reordered by dragging.
How do notebook cells and code execution work?
Add cells using + Code, + Text, or Assistant between existing cells.
Run an individual code cell using its Run button or Shift + Enter; Run All executes cells sequentially from top to bottom.
Outputs appear directly beneath the executed cell.
Notebooks support Python and SQL. New code cells use the notebook’s default language, shown near the Help menu, but individual cells can use a different language.
Switching a cell’s language adds a magic command such as %python, %sql, or %md to indicate how the cell should be interpreted.
How can Markdown and notebook navigation improve organisation?
Markdown cells document notebooks using headings, bullet points, links, and tables.
Create a Markdown cell with + Text, the cell language selector, or %md at the beginning of a cell.
Double-click a Markdown cell to edit it; Show Preview displays rendered Markdown alongside the source.
Markdown headings automatically populate the Table of Contents in the left sidebar, allowing quick navigation to sections.
The left sidebar also provides a Workspace browser for notebooks and other assets, and a compact Catalog Explorer for browsing catalogs, schemas, tables, and volumes or inserting references into code.
The right sidebar provides Comments, MLflow experiments, Version history, Variables, Environment, Information, and Assistant.
What features help you focus on results and create visualisations?
Focus mode, accessed from the upper-right corner of a cell, expands one cell and its results while hiding surrounding cells.
Comments, Assistant, and the terminal remain accessible in Focus mode; use the left and right arrows to switch cells and the Focus mode icon to exit.
For tabular cell results, select the + beside the output to create an inline chart, such as a bar, scatter, or line chart.
Configure the chart type and X/Y values, then save it; you can switch between the table and chart within the cell.
How can Databricks Assistant help write and debug notebook code?
Open Assistant from the right sidebar, the top navigation bar, or the inline Assistant option between cells.
Describe a task in natural language to generate Python or SQL code; generated snippets can be inserted into cells or accepted and run.
Specify the desired language, table names, and columns in prompts. For example, explicitly request SQL when the notebook defaults to Python to avoid receiving PySpark code instead.
When a cell fails and Assistant Quick Fix is enabled, Diagnose Error sends the failing code and error message to Assistant for an explanation and suggested fix.
Test or edit suggested fixes; further debugging may be necessary if resolving one error exposes another.
Review all generated code and results before sharing or using them in production, and compare Assistant’s explanation with the full stack trace when troubleshooting.
How do you inspect and change the active Unity Catalog context in a notebook?
Run SELECT current_catalog(), current_schema(); to check the active catalog and schema.
Use USE CATALOG catalog_name; and USE SCHEMA schema_name; to change the current context.
The active context determines whether table references can use short names or need the fully qualified catalog.schema.table form.
Run DESCRIBE SCHEMA EXTENDED schema_name; to inspect schema metadata such as owner, storage location, comments, and custom properties.
How can SQL be used to explore data assets in Unity Catalog?
SHOW TABLES; lists tables and views in the current schema, helping identify available objects and their metadata.
SHOW VOLUMES; lists volumes in the current schema; you can also list files within a volume path to inspect raw data available for processing.
Tables and views appear together when exploring the schema, but they may differ in how they are managed or edited.
How are Unity Catalog permissions managed from notebooks?
Use ANSI-style SQL GRANT statements to assign privileges on assets, such as granting SELECT on a table to a user or group.
Access to a table also requires USE CATALOG and USE SCHEMA privileges on its parent catalog and schema.
Verify permissions with SHOW GRANTS in SQL or the Permissions tab in Catalog Explorer.
SQL is useful for automating permission changes, while Catalog Explorer provides a visual way to confirm them.