Sub topic 5
Finding your way around the workspace
This chapter assumes you know basic SQL and Python, and that you understand what a workspace is from the previous chapter. It walks through the sidebar and the objects you will see in a Databricks workspace, so you can find your notebooks, data, and compute quickly.
The sidebar
The left sidebar is the main way to move around. The exact labels change between releases, but the groups stay the same.
| Area | What you do there |
|---|---|
| Workspace | Browse folders, notebooks, files, and Git folders |
| Catalog | Explore catalogs, schemas, tables, and volumes in Unity Catalog |
| Compute | Create and manage clusters and SQL warehouses |
| Jobs & Pipelines | Schedule notebooks and monitor runs |
| SQL Editor, Queries, Dashboards | Write SQL and build dashboards on a SQL warehouse |
Workspace objects
A workspace holds several kinds of objects. Knowing which kind you are looking at tells you where it lives and who can see it.
- Folders organize everything else. Each user has a personal folder under
Users. Shared work goes inSharedor in a folder your team owns. - Notebooks are documents with cells of code and text. They attach to compute when you run them.
- Files are scripts, configuration, and other plain files stored next to your notebooks.
- Git folders are folders linked to a remote Git repository.
- Queries, dashboards, and alerts belong to Databricks SQL.
- Jobs are scheduled or triggered runs of notebooks and other tasks.
Tables are different. They are not workspace files. They live in Unity Catalog, and you find them in Catalog, not in the folder tree.
Following a table from the sidebar to code
Open Catalog and expand main, then tutorial, then orders. The table page shows its columns, sample data, permissions, and history. Copy the full name from the page, which is main.tutorial.orders, and use it in a notebook cell:
df = spark.table("main.tutorial.orders")
display(df.limit(5))The cell runs only after you attach the notebook to compute. If the selector at the top of the notebook says no compute is attached, nothing will execute.
Common mistakes
- Looking for a table in the workspace folder tree. Tables appear in Catalog. Folders hold notebooks and files.
- Running a cell with no compute attached. Pick a cluster or serverless compute from the selector first.
- Saving shared work in your personal folder. Colleagues cannot see it by default. Move it to a shared folder or a Git folder.
- Not seeing a catalog or table you expect. Usually you lack
USE CATALOG,USE SCHEMA, orSELECT. Unity Catalog hides objects you cannot access.
Exercise
You created a table with SQL but cannot find it in the Workspace folder browser. Where do you look, and why?
Show answer
Look in Catalog. Tables are Unity Catalog objects addressed as catalog.schema.table, not files in the workspace folder tree. Folders hold notebooks, files, and Git folders.
Exercise
A colleague says a notebook cell does nothing when run. What is the first thing to check?
Show answer
Check the compute selector at the top of the notebook. A notebook must be attached to a cluster or serverless compute before its cells can run.