Sub topic 4
What a workspace is
A workspace is the environment where you do your work in Databricks. It holds your notebooks, queries, jobs, and compute, and it connects them to your data. This chapter assumes you know the control plane and compute plane split from the previous chapter, and that you know basic SQL and Python.
What a workspace contains
A workspace is a deployment of the Databricks control plane, reached through its own URL. Each workspace belongs to one cloud account and one region. It stores the following objects:
- Notebooks, files, and folders.
- Compute resources such as clusters and SQL warehouses.
- Jobs and their run history.
- Saved queries, dashboards, and alerts.
- Users, groups, and service principals that have been added to it.
The workspace does not store your table data. The data lives in cloud object storage, and Unity Catalog governs access to it. This separation matters in practice, because one catalog can be attached to several workspaces.
Workspaces and metastores
A metastore is the top-level Unity Catalog container for metadata. You normally create one metastore per cloud region and attach it to every workspace in that region. Each attached workspace then sees the same catalogs and tables.
Because of this, a table named main.tutorial.orders resolves to the same data from either workspace, provided the user has permission.
Why teams use more than one workspace
A single workspace is enough to start. Teams add more for these reasons:
- Environment separation. Development, staging, and production each get their own workspace, so a mistake in a notebook cannot touch production jobs.
- Isolation. Different business units may need separate admins, network rules, or billing views.
- Limits. Each workspace has quotas, such as a cap on concurrent jobs or API request rates.
More workspaces mean more administration. Each one needs its own users, compute policies, and networking setup. Use a new workspace when you need a real boundary, not for every project.
What is scoped to the workspace
Some things are workspace-level, and others are account-level. Mixing them up is a common source of confusion.
| Item | Scope |
|---|---|
| Notebooks, jobs, clusters | Workspace |
| Compute policies | Workspace |
| Catalogs, schemas, tables | Metastore (shared across attached workspaces) |
| Users and groups | Account, then assigned to workspaces |
A user can exist in your account yet have no access to a given workspace. An admin must assign them to it.
Checking where you are
You can confirm the workspace and catalog your code is using from a notebook:
SELECT current_metastore(), current_catalog(), current_schema();If the result shows a different catalog than you expected, set it with USE CATALOG main; before running queries that use short names.
Exercise
A team has a Dev workspace and a Prod workspace in the same region, both attached to one metastore. A developer creates a notebook in Dev and a table main.tutorial.orders. Which of these can a user with the right permissions see from Prod, the notebook or the table?
Show answer
The table. Tables are governed by the metastore, which both workspaces share. The notebook is stored in the Dev workspace and is not visible in Prod unless it is moved, for example through a Git folder.