Tables and Unity Catalog
Which Table Does This Name Identify?
Both the maintenance team and the commissioning team have a table called readings. One contains measurements from running pumps. The other contains test equipment. Asking for readings is understandable only if we also know where the program is looking.
Databricks uses catalogs and schemas to organize registered tables. A full name can identify the department’s table directly. Before writing a query, we need to understand those names and the difference between finding a table and being allowed to read it.
This local model uses simple lowercase registered names and explicit effective reader lists. It does not parse SQL, authenticate identities or implement Unity Catalog inheritance, ownership, namespace privileges, workspace restrictions or cloud storage permissions.
Step 1 of 1
The same short name can belong to different teams
The final component is readings in both examples. The schema tells us which team’s records are meant.
| Catalog | Schema | Table | Example pump |
|---|---|---|---|
| operations | maintenance | readings | P7 |
| operations | commissioning | readings | TEST_P7 |
operations
- Schema
- maintenance
- Table
- readings
- Example pump
- P7
operations
- Schema
- commissioning
- Table
- readings
- Example pump
- TEST_P7
A registered table gives the dataset a name
The resolved full identity remains visible. Identical short names cannot silently stand in for each other across departments.
Why Teams Needed a Shared Record of Their Tables
BOTIE
Databricks announced Unity Catalog at its 2021 Data and AI Summit. Its April 2022 public-preview announcement described the problem of managing access across different data assets and workspaces. Centralized metadata and access management were practical needs created by shared data work. A table name became part of an organized, governed namespace rather than an informal label inside one notebook.
Unity Catalog now organizes tables under catalogs and schemas and manages their metadata and supported access. We will begin with that naming structure. The later permissions lesson works through the required privileges in more detail; recognizing a table and authorizing a request are separate steps.
Find the intended registered table
Two departments use readings as a table name. Botie needs to see which full table the supplied reference actually requests before using its records.
BOTIE
Resolved table identity and copied records
- name
- operations.maintenance.readings
- rows
- pump
- P7
- temperature_c
- 12
pump temperature_c P7 12
Follow the operations
1. Registered tables and effective readers
[ { "name": "operations.maintenance.readings", "readers": [ "botie" ], "rows": [ { "pump": "P7", "temperature_c": 12 } ] }, { "name": "operations.commissioning.readings", "readers": [ "botie" ], "rows": [ { "pump": "TEST_P7", "temperature_c": 80 } ] } ]2. Requested table-name parts
- 0readings
3. Current catalog
operations
4. Current schema
maintenance
5. Resolve a table name
operations.maintenance.readings
6. Find the registered table
- name
- operations.maintenance.readings
- readers
- 0botie
- rows
- pump
- P7
- temperature_c
- 12
pump temperature_c P7 12
7. Verified principal identity
botie
8. Read as the named principal
- name
- operations.maintenance.readings
- rows
- pump
- P7
- temperature_c
- 12
pump temperature_c P7 12
9. Result
- name
- operations.maintenance.readings
- rows
- pump
- P7
- temperature_c
- 12
pump temperature_c P7 12
This local model uses simple lowercase registered names and explicit effective reader lists. It does not parse SQL, authenticate identities or implement Unity Catalog inheritance, ownership, namespace privileges, workspace restrictions or cloud storage permissions.
1. A registered table gives the dataset a name
A table presents data as rows and named columns. Registering it gives another program a name to request, together with metadata about the table. Metadata is information about the dataset, such as its columns, format and how the system can locate it. It is distinct from the measurements stored in its rows.
A table can contain many data files. A registered table name is therefore not normally the filename of one Parquet object. The catalog entry and the table format help the reader find the appropriate data.
Keep the table identity beside its rows in the workshop output. That makes a wrong-table read visible even when both tables have the same column names.
2. Catalog, schema and table organize the name
A catalog is a top-level container for related data objects. Inside it, schemas group objects more specifically. A schema can contain tables and other objects. In this naming context, schema means that container; a table’s column schema means its field structure. The word has two related uses.
Our catalog is operations. Within it, maintenance and commissioning are schemas. Each has its own readings table. The three-part name operations.maintenance.readings identifies the maintenance table without requiring someone to guess which group was intended.
These components organize registered objects. They are not a promise that cloud storage contains matching folders named operations/maintenance/readings.
catalog: operations
schema: maintenance
table: readings
full name: operations.maintenance.readingsUse a name component for the level it describes. The catalog contains the schema; the schema contains the table.
Check yourself
Questions on Parts 1 to 2
Question 1 of 2
Which component is the schema?
Question data
The full name is operations.maintenance.readings.3. Short names depend on the current catalog and schema
A session has a current catalog and a current schema. A session is the context of the current interaction with the compute service. When a query supplies only readings, those defaults fill in the missing parts.
Supplying maintenance.readings uses the current catalog and the named schema. Supplying operations.maintenance.readings gives every component. That fully qualified reference keeps identifying the maintenance table if the current schema changes. It does not change the session defaults itself.
SQL also has rules for temporary views, quoted identifiers and other kinds of name resolution. We keep this workshop narrower: it receives one to three simple lowercase name parts referring only to registered tables. It is not a parser for arbitrary SQL.
current catalog: operations
current schema: commissioning
readings -> operations.commissioning.readings
maintenance.readings -> operations.maintenance.readings
operations.maintenance.readings -> operations.maintenance.readingsBefore assuming a calculation is wrong, inspect which full table name the short reference actually selected.
Resolve one name from explicit defaults
A Python list keeps the supplied name parts separate. Here the one-part reference needs both defaults.
parts = ["readings"]
current_catalog = "operations"
current_schema = "commissioning"
full_parts = [current_catalog, current_schema] + parts
print(".".join(full_parts))operations.commissioning.readingsThe fuller challenge must also handle two- and three-part references without adding defaults that were already supplied.
4. What Unity Catalog keeps track of
Unity Catalog is Databricks’ system for organizing and governing supported data and AI assets. For these lessons, its relevant job is to record table identities and metadata and apply access rules to supported requests. Catalog Explorer is an interface for browsing those registered objects.
A workspace notebook is where we write and run code. A registered table is a governed data object that code may request. Putting a notebook in a workspace folder does not move its tables into a schema with that folder’s name.
Finding a visible table and obtaining permission to read its data are different operations. A useful interface should make the resolved identity inspectable before we investigate access or the query’s arithmetic.
The local registry is a list of dictionaries describing tables. It exposes name lookup for inspection. Unity Catalog is the deployed service responsible for registered metadata and its supported governance functions.
5. Reading data requires permission and configured access
A principal is the identity making a request, such as a user or a service identity. For an ordinary table read, Unity Catalog privileges include SELECT on the table and the necessary USE CATALOG and USE SCHEMA privileges on its containers. Ownership, inherited privileges and other supported rules affect how real access is established.
The compute and storage connection must also be configured appropriately. Granting a principal SELECT does not create a missing cloud storage credential or remove every workspace restriction. Conversely, a person with independent access to raw external files may bypass the catalog path, so cloud storage permissions need their own care.
Our exercise assumes the namespace, compute and cloud connection are already valid. Each registry entry supplies an effective reader list for this local decision. The supplied principal is assumed to be verified; typing a different name in this model is not authentication.
The final component refuses a local read when the principal is absent from that table’s reader list. The later governance lesson examines more of the real permission hierarchy.
6. Managed and external tables have different storage responsibilities
For a Unity Catalog managed table, Databricks manages the table’s data lifecycle and storage arrangement. A team generally works with the registered name rather than modifying its underlying files directly. Dropping a managed table can ultimately remove its data after the applicable recovery period.
An external table also has registered metadata, but its data files live at an explicitly configured external location. Removing that table registration does not delete the underlying files. The team responsible for the storage still has to manage them. That does not make an external table ungoverned: Unity Catalog governs supported access through the table, while direct access outside that path depends on the cloud controls.
Both types can use the same three-part naming structure. A name tells us which registered object was requested; its metadata tells us more about the object’s storage and lifecycle.
Do not test lifecycle behavior by dropping a real table. Read the object’s metadata and the current platform documentation before making storage changes.
7. Inspect the context before reading a named table
The optional SQL asks which catalog and schema the session is using, then reads a fully qualified table. The explicit reference avoids relying on those defaults for this read. LIMIT bounds the displayed result; it does not establish the table’s complete contents or a guaranteed row order.
The browser challenge performs the naming steps with Python lists and dictionaries. Unknown names fail instead of falling back to a table from another schema.
If an expected table is missing, inspect its full identity and permissions. Do not search other departments until a convenient short-name match appears.
Run in your own environment
Inspect the session and read one explicit table
This optional reference uses your own configured Databricks environment. The browser challenge uses local Python data and does not contact a cloud service.
Use the SQL editor or a SQL notebook cell on your own supported Databricks compute, with Unity Catalog enabled.
An approved table operations.maintenance.readings must already exist with pump and temperature_c columns. The principal needs the required table and namespace privileges, and the environment must have configured access to its storage.
The statements only read context and table data. They do not create a table, change grants or modify the current schema. Compute can incur charges.
SELECT current_catalog(), current_schema();
SELECT pump, temperature_c
FROM operations.maintenance.readings
LIMIT 20;The table read names all three components. Changing a default schema does not redirect that explicit reference.
Official interface documentation. Documentation checked .
8. Keep resolution, lookup and authorization visible
Botie’s construction has three decisions to inspect. First resolve missing name parts from the supplied current catalog and schema. Next find that exact full name in the registry. Finally check the named principal against the chosen table’s effective reader list before returning its rows.
The changed case moves the current schema from maintenance to commissioning while retaining the short reference readings. The resolved identity should change. A later case supplies all three maintenance components, so its identity should stay explicit despite the changed default.
The model uses exact, simple lowercase names. Real SQL has a broader identifier grammar and resolution rules. It also performs authentication and permission checks this local lookup does not implement. Keep those limits in mind while testing the naming behavior.
Predict the resolved full name before looking at the row values. Two tables can share a column structure and still answer different questions.
Check yourself
Questions on Parts 1 to 8
Question 1 of 6
Which full name does this reference select in the lesson’s naming model?
Question data
Current catalog: operations. Current schema: commissioning. The supplied registered-table reference is readings.Try it with Botie
Build with Botie
Write and run Python