Databricks-DE-Pro Developing Code (Python/SQL) Practice Question
When using the Unity Catalog, how should an engineer properly reference a table named 'sales' located in the 'finance' schema within the 'prod_catalog' catalog using Spark SQL?
⚠ Common exam trap
Candidates often use two-part naming (schema.table) or forget the catalog name. In Unity Catalog, the fully qualified three-level namespace (catalog.schema.table) is required for proper object identification.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
SELECT * FROM prod_catalog.finance.sales
Unity Catalog uses a three-level namespace hierarchy: catalog.schema.table. This structure provides consistent governance and discovery across the entire Databricks account. Proper referencing requires the fully qualified name to ensure Spark identifies the exact object within the catalog's permission model. This implementation is crucial for security and multi-tenant environments where namespaces must be strictly isolated to prevent unauthorized access and data leakage across production and development environments.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
SELECT * FROM finance.sales
Why it's wrong here
This two-level reference assumes the current catalog is set. Relying on implicit catalog settings is risky in large environments where different teams work in various catalogs. Fully qualified names are required to guarantee that the correct table is accessed and to avoid ambiguity during complex cross-schema query execution within multi-catalog setups.
- ✓
SELECT * FROM prod_catalog.finance.sales
Why this is correct
The three-level namespace (catalog.schema.table) is the standard for Unity Catalog. This specific syntax ensures that the Spark engine correctly routes the request through the Unity Catalog's security and metadata layers, validating permissions before attempting to read the underlying data stored in the cloud object storage bucket.
- ✗
SELECT * FROM sales
Why it's wrong here
Referencing by table name alone is only valid if the catalog and schema are already set as the defaults in the current session. In production code, this is dangerous because the environment state may change. Fully qualified names are mandatory for production-grade code to ensure repeatability and prevent errors caused by session context.
- ✗
SELECT * FROM catalog_prod.finance.sales
Why it's wrong here
This syntax is incorrect because the catalog name provided does not match the required naming convention specified in the question ('prod_catalog'). Mismatched names will result in a TableNotFound exception. Unity Catalog requires an exact match for the catalog, schema, and table components to resolve the object within the metastore hierarchy.
About these practice questions
Courseiva writes every Databricks-DE-Pro question from scratch — 267 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Databricks exam blueprint
This Databricks-DE-Pro practice question is part of Courseiva's free Databricks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the Databricks-DE-Pro exam.