CertSafari
    Databricks Certified Data Analyst Associate· Lessons

    Domain 9 · Lesson 38/39

    Unity Catalog three-level namespace: catalogs, schemas, tables and volumes

    Understand how the 3-level namespace (Catalog / Schema / Tables or Volumes) works in the Unity Catalog.

    18 min read
    2.67% of exam
    11 sources
    Published 22 Oct 2026
    Docs as of 17 Oct 2026

    What you will be able to do

    • Place the metastore, catalogs, schemas, tables, views and volumes correctly in the Unity Catalog hierarchy
    • Write fully qualified catalog.schema.table names and predict how one- and two-part names resolve
    • Use USE CATALOG and USE SCHEMA to set the session context, and check it with current_catalog() and current_schema()
    • Tell when a volume is addressed by its three-part name and when by its /Volumes/ path

    Key concept

    Three-level namespace — In Unity Catalog, every table, view or volume is named by three parts: the catalog that contains it, the schema inside that catalog, and the object itself. The metastore sits above all three as the container for them and is not part of the name.

    1.The metastore and the three levels beneath it

    Every table you query in a Unity Catalog workspace has an address made of three names: catalog.schema.table. That address does two jobs. It tells the SQL engine which object you mean, and it gives the access-control model a hierarchy to work through. A query that names the wrong level, or leaves a level out, either fails or reads a different table from the one you wanted.

    The metastore is the container above the namespace, but it is not one of the three levels. A metastore covers one cloud region. Your organization has one metastore per region, and that one metastore can be attached to several workspaces in the same region. So a workspace is not a namespace level either. Several workspaces can share the same catalogs because they share the metastore. Some objects live directly under the metastore rather than inside a catalog: storage credentials, external locations, connections and shares.

    From the top down, the three levels are:

    1. Catalog: the first level, which sits directly under the metastore.
    2. Schema: the middle level, a child of a catalog.
    3. Object: a table, view, volume, function or model, which lives inside a schema.

    Catalogs and schemas are container objects because they hold children. Tables, views, volumes and functions don't. That difference matters for permissions, because privileges granted on a container reach the objects inside it. The rules for granting are covered in Unity Catalog privileges and inheritance.

    What each level of the hierarchy holds
    LevelPositionContains
    MetastoreTop-level container, one per cloud region; not part of the nameCatalogs, plus storage credentials, external locations, connections, shares
    CatalogFirst part of catalog.schema.tableSchemas
    SchemaSecond part of catalog.schema.tableTables, views, volumes, models, functions
    Table / view / volumeThird part of the nameRows and columns (table), a saved query (view), or files (volume)

    Checkpoint 1 of 8· Match them up

    Match each Unity Catalog level to where it sits and what it holds

    Tap a term, then the definition that fits it.

    Checkpoint 2 of 8· Exam question

    In Unity Catalog, what are the three levels of the namespace used to fully qualify a table, listed from the top (broadest) level down to the object itself?

    Sources123

    2.Catalogs isolate, schemas organise

    A catalog is the unit of isolation. It is the highest level you design yourself, so each catalog should stand for a logical unit of data isolation and a logical category of data access. That is why catalogs usually follow organizational units or software development lifecycle scopes. Typical examples are a prod catalog and a dev catalog, or one catalog for non-customer data and another for sensitive customer data. Grants flow down from a catalog to everything inside it, so a well-chosen catalog boundary is also an access boundary. Isolation is physical too. A catalog usually has its own managed storage location for managed tables and volumes, and because there is one metastore per region, catalogs are also isolated by region.

    A schema divides a catalog into finer groups. A schema typically represents one use case, project or team sandbox. Two schemas in different catalogs can have the same name, and the same is true of tables. prod.sales.orders and dev.sales.orders are separate objects that can hold different data. A schema can also have its own managed storage location. If it doesn't, its managed data goes to the catalog's location, and if the catalog has none either, to the metastore's location.

    Databricks has a few naming habits that trip up people coming from other databases. In Databricks a schema is sometimes called a database, and CREATE DATABASE is an alias for CREATE SCHEMA. In some relational systems a database is a collection of schemas, but here the two words name the same level. Every catalog also automatically contains an INFORMATION_SCHEMA, a reserved schema of read-only metadata views that describe the catalog's objects.

    Some catalogs exist before anyone creates one:

    • Workspace catalog: created by default in new workspaces and usually named after the workspace. All users of that workspace, and only that workspace, can use it by default.
    • hive_metastore: holds objects from the legacy Hive metastore, which is deprecated.
    • __databricks_internal: a reserved catalog where Databricks stores internal state for features such as Lakeflow pipelines and AI/BI dashboards. Don't query, modify or delete its objects.

    There is also the foreign catalog, a catalog type you create rather than one provisioned for you. A foreign catalog mirrors a database in an external system for read-only queries through Lakehouse Federation.

    Checkpoint 3 of 8· Check yourself

    A company must keep production and development data apart, with separate access and separate managed storage for each. Within each environment, it wants to group tables by project. Which Unity Catalog layout fits this?

    Sources45

    3.Fully qualified names

    A three-part name points to exactly one object. catalog.schema.table is unique in the metastore, so it means the same thing in every session and every tool. Querying by table name works in all Databricks execution contexts and supported languages.

    A table referenced by its three-tier identifiersql
    SELECT * FROM catalog_name.schema_name.table_name

    You can leave out leading parts of the name, and Databricks fills them in from the session. A two-part name gets the current catalog. A one-part name gets both the current catalog and the current schema. Databricks never searches other catalogs for a matching name. Suppose prod and dev both contain sales.orders. Writing sales.orders reads whichever catalog the session is currently in. The only way to be sure you read the prod copy is prod.sales.orders.

    How each identifier pattern is completed
    Identifier patternRefers to
    catalog_name.schema_name.object_nameExactly the object named
    schema_name.object_nameThat schema and object in the current catalog
    object_nameThat object in the current catalog and current schema

    Use fully qualified identifiers whenever a query or workload reads objects from more than one schema or catalog. A fully qualified reference also doesn't change the session's current catalog or schema. You can therefore mix a three-part reference into a script that relies on short names without breaking the names that come after it.

    Checkpoint 4 of 8· Check yourself

    A session's current catalog is dev, and the prod and dev catalogs both contain sales.orders. A script first runs SELECT * FROM prod.sales.orders, then runs SELECT * FROM sales.orders. Which table does the second query read?

    Checkpoint 5 of 8· Exam question

    A workspace has two catalogs, prod and dev, and both contain a schema named sales with a table named orders that have different row counts. An analyst needs to query only the orders table in the prod catalog. Which approach correctly and unambiguously targets that table?

    Sources6

    4.How USE CATALOG and USE SCHEMA resolve short names

    Short names are completed from two settings in the session: the current catalog and the current schema. In a new session, the current catalog is the workspace's default catalog. When a workspace was enabled for Unity Catalog automatically, that default is the pre-provisioned workspace catalog, and a workspace admin can change it. The default schema name is default. So a bare SELECT * FROM sales_orders really means <workspace default catalog>.default.sales_orders.

    Resolving an unqualified table name takes three steps:

    1. If the name is inside a WITH clause, Databricks first looks for a common table expression with that name.
    2. Next it looks for a temporary view or temporary table in the session.
    3. Last, it adds the current catalog and current schema to the front of the name and looks for a persisted table.

    If nothing matches, the query fails with TABLE_OR_VIEW_NOT_FOUND. That error means no object exists at the name the query was resolved to, and it often happens even though the table exists somewhere else. The fix is to point the session at the right place with USE CATALOG and USE SCHEMA, or to write the full three-part name.

    The example below first sets the current catalog and schema, then reaches one table three ways. Here spark_catalog is simply the catalog the example makes current with USE CATALOG. In your own session it would be the workspace default catalog or whichever catalog you set, and the resolution rule is identical.

    The same table reached by a fully qualified, a partially qualified and an unqualified namesql
    -- Setting up a scenario
    > USE CATALOG spark_catalog;
    > USE SCHEMA default;
    
    > CREATE TABLE rel(c1 int);
    > INSERT INTO rel VALUES(1);
    
    -- An fully qualified reference to rel:
    > SELECT c1 FROM spark_catalog.default.rel;
     1
    
    -- A partially qualified reference to rel:
    > SELECT c1 FROM default.rel;
     1
    
    -- An unqualified reference to rel:
    > SELECT c1 FROM rel;
     1

    The order of the two statements matters. USE CATALOG changes the current catalog and also resets the current schema to default. USE SCHEMA changes only the schema, and the schema must exist in the current catalog. If you want to set both in one statement, USE SCHEMA catalog_name.schema_name does that. When you're unsure where a short name will resolve, SELECT current_catalog(), current_schema() shows you.

    USE CATALOG resets the schema; USE SCHEMA then sets it within that catalogsql
    -- Setting the catalog resets the schema to `default`
    > USE CATALOG some_cat;
    > SELECT current_catalog(), current_schema();
      some_cat default
    
    -- Setting the schema within the current catalog
    > USE SCHEMA some_schem;
    > SELECT current_catalog(), current_schema();
      some_cat some_schema

    Checkpoint 6 of 8· Check yourself

    In a workspace that was enabled for Unity Catalog automatically, a workspace admin has changed the default catalog to prod. An analyst opens a brand-new SQL session, runs no USE statements, and queries SELECT * FROM sales.orders. Which catalog does Databricks look in for sales.orders?

    Checkpoint 7 of 8· Exam question

    A data analyst in the Databricks SQL editor runs SELECT * FROM sales_orders; and gets an error that the table cannot be found, even though the table exists and the analyst has been granted SELECT on it. No catalog or schema has been set for the session. What is the most likely cause, and how should the analyst fix it?

    Sources47896

    5.Volumes: governed files at the third level

    Volumes sit at the same level as tables, but they hold files instead of rows. A volume is a Unity Catalog object for non-tabular data in any format, whether structured, semi-structured or unstructured. Typical contents are raw landing files, staging areas for ingestion, images and PDFs, and library files. A volume lives in a schema just as a table does, so it is named catalog.schema.volume. Like tables, volumes come in managed and external types. A managed volume lives in Unity Catalog storage. An external volume adds governance to an existing cloud storage path.

    A volume has two kinds of address, and each one has its own job. You use the three-part identifier for management commands such as CREATE VOLUME and DROP VOLUME. To read or write files, you use a path:

    /Volumes/<catalog>/<schema>/<volume>/<path>/<file-name>

    The /<catalog>/<schema>/<volume> part of the path is just the three object names. Those directories are read-only and managed by Unity Catalog, so you can't create or delete them with filesystem commands. You also can't list objects with a partial path such as /Volumes/<catalog-name>/<schema-name>. The path must include a volume name.

    Querying JSON files through a volume path in SQLsql
    SELECT * FROM json.`/Volumes/catalog_name/schema_name/volume_name/path/to/data`

    Tables and volumes cannot stand in for each other. The files in a volume can't be registered as a table, because volumes are for path-based access only, and a managed table can't be read by path, so you always use its name. To query tabular files with SELECT ... FROM name, load their contents into a new table instead: read the /Volumes/ path and write the result out with CTAS (CREATE TABLE AS), COPY INTO or Auto Loader. That is what a volume used as an ingestion staging location is for. How managed and external tables are created is covered in creating managed and external tables.

    Which address works for which Unity Catalog object
    ObjectObject identifierFile pathCloud URI
    Managed tableyesnono
    External tableyesnoyes
    Managed volumenoyesno
    External volumenoyesyes

    Checkpoint 8 of 8· Match them up

    Which addresses can reach the data of each Unity Catalog object type? Pair each object with its allowed access methods.

    Tap a term, then the definition that fits it.

    Sources1011

    Practise it for real

    Watch the session context change and see how it affects the way short names resolve

    1. 1.In the SQL editor, run SELECT current_catalog(), current_schema();

      Why: This shows where unqualified names resolve before you have set anything.

      You should see: The workspace's default catalog and the schema default.

    2. 2.Run USE CATALOG followed by a catalog you can access, then run SELECT current_catalog(), current_schema(); again.

      Why: This shows that switching catalog also resets the schema.

      You should see: The new catalog name, with the schema shown as default.

    3. 3.Run USE SCHEMA with a schema in that catalog, then check current_schema() again.

      Why: USE SCHEMA changes only the schema within the current catalog.

      You should see: The same catalog, now with your chosen schema.

    4. 4.Query one table twice: once by its bare table name and once as catalog.schema.table.

      Why: Both return the same rows only because the session context matches the full name.

      You should see: Identical results. Switch to a different catalog, and the bare name fails with TABLE_OR_VIEW_NOT_FOUND while the three-part name still works.

    Stuck? Get a nudge

    USE SCHEMA catalog_name.schema_name sets both values in one statement.

    Sources

    (11)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “your data assets live in a three-level namespace that defines its catalog, schema, and type of asset, such as table (catalog.schema.table)”
      ↩︎ The metastore and the three levels beneath it
      “A single metastore can be attached to multiple workspaces in the same region.”
      ↩︎ The metastore and the three levels beneath it
      “your data assets live in a three-level namespace that defines its catalog, schema, and type of asset, such as table (catalog.schema.table)”
      ↩︎ Exam trap 1
    2. 2.
      “Other objects, such as storage credentials, external locations, connections, and shares, sit directly under the metastore.”
      ↩︎ The metastore and the three levels beneath it
    3. 3.
      “Schemas: The middle level of the three-level namespace. Schemas contain tables, views, volumes, and functions as direct children.”
      ↩︎ The metastore and the three levels beneath it
      “Within this metastore, data is represented as objects in a three-level namespace: catalog.schema.table.”
      ↩︎ Key concept
      “data and metadata live in a top-level container called a metastore. Within this metastore, data is represented as objects in a three-level namespace: catalog.schema.table”
      ↩︎ Checkpoint
    4. 4.
      “each catalog should represent a logical unit of data isolation and a logical category of data access”
      ↩︎ Catalogs isolate, schemas organise
      “Catalogs therefore often mirror organizational units or software development lifecycle scopes.”
      ↩︎ Catalogs isolate, schemas organise
      “Do not query, modify, or delete objects in the __databricks_internal catalog.”
      ↩︎ Catalogs isolate, schemas organise
      “If you omit the top-level catalog name when you perform data operations, the default catalog is assumed.”
      ↩︎ How USE CATALOG and USE SCHEMA resolve short names
      “You might choose, for example, to have a catalog for production data and a catalog for development data”
      ↩︎ Checkpoint
      “If you omit the top-level catalog name when you perform data operations, the default catalog is assumed.”
      ↩︎ Checkpoint
    5. 5.
      “In Databricks, schemas are sometimes called databases. For example, CREATE DATABASE is an alias for CREATE SCHEMA.”
      ↩︎ Catalogs isolate, schemas organise
      “Every Unity Catalog catalog automatically includes an INFORMATION_SCHEMA, a system-provided schema of read-only metadata views that describe the catalog's objects.”
      ↩︎ Catalogs isolate, schemas organise
    6. 6.
      “Databricks recommends using fully-qualified identifiers when queries or workloads interact with database objects stored across multiple schemas or catalogs.”
      ↩︎ Fully qualified names
      “Querying by table name is supported in all Databricks execution contexts and supported languages.”
      ↩︎ Fully qualified names
      “do not change the current catalog or schema and always refer to the object specified.”
      ↩︎ Fully qualified names
      “Set the current catalog using the provided catalog_name and the current schema using the provided schema_name.”
      ↩︎ How USE CATALOG and USE SCHEMA resolve short names
    7. 8.
      “If the relation cannot be resolved to any table, view, or CTE, Databricks raises a TABLE_OR_VIEW_NOT_FOUND error.”
      ↩︎ How USE CATALOG and USE SCHEMA resolve short names
      “If the identifier consists of two parts: schema.relation, it is further qualified with the result of SELECT current_catalog() to make it unique.”
      ↩︎ Exam trap 2
    8. 9.
      “For the USE CATALOG Unity Catalog privilege, which users need to interact with objects in a catalog, see USE CATALOG.”
      ↩︎ How USE CATALOG and USE SCHEMA resolve short names
      “Setting the catalog also resets the current schema to default.”
      ↩︎ Exam trap 3
      “Setting the catalog also resets the current schema to default.”
      ↩︎ Prediction
    9. 10.
      “While tables govern tabular data, volumes govern non-tabular data of any format, including structured, semi-structured, or unstructured.”
      ↩︎ Volumes: governed files at the third level
      “The /<catalog>/<schema>/<volume> portion of the path maps to the three Unity Catalog object names for the file.”
      ↩︎ Volumes: governed files at the third level
      “You can't register files in volumes as tables in Unity Catalog. Volumes are intended for path-based data access only.”
      ↩︎ Volumes: governed files at the third level
      “Register staging locations for ingestion. For example, using Auto Loader, COPY INTO, or CTAS (CREATE TABLE AS) statements.”
      ↩︎ Volumes: governed files at the third level
    10. 11.
      “Unity Catalog volumes use three-tier object identifiers with the following pattern for management commands (such as CREATE VOLUME and DROP VOLUME):”
      ↩︎ Volumes: governed files at the third level
      “Path-based access to Unity Catalog managed tables is not supported.”
      ↩︎ Volumes: governed files at the third level
      “To actually work with files in volumes, you must use path-based access.”
      ↩︎ Exam trap 4
      “Always interact with Unity Catalog managed tables using table names and Unity Catalog managed volumes using volume paths.”
      ↩︎ Checkpoint

    Spotted a mistake, or was something unclear? Tell us.