Courseiva
Managing Data →easyMultiple Choice

Databricks-DA-Assoc Managing Data Practice Question

A data analyst runs the following SQL in a Databricks SQL warehouse:

CREATE OR REPLACE TEMPORARY VIEW monthly_sales AS SELECT month, SUM(revenue) AS total_revenue FROM sales.orders GROUP BY month;

Immediately afterward, the analyst opens a new query tab in the same SQL warehouse session and runs SELECT * FROM monthly_sales; The query fails with a TABLE_OR_VIEW_NOT_FOUND error. What is the most likely reason for the failure?

⚠ Common exam trap

The trap here is assuming that any object created with CREATE VIEW, even a TEMPORARY one, becomes a persistent, catalog-registered object visible to all users and sessions.

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

✓

The view was created as a temporary view, which is scoped to the notebook or session that created it, so a new query tab cannot resolve it.

Temporary views are bound to the session or notebook that creates them and are not stored in Unity Catalog. When the analyst opens a separate query tab, that new session has its own namespace and cannot resolve the temporary view, producing TABLE_OR_VIEW_NOT_FOUND. Persisting the view as a regular view or a managed table would make it accessible across sessions.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    The view definition was persisted in Unity Catalog, but the second tab lacks USE CATALOG privileges on the default catalog.

    Why it's wrong here

    Temporary views are never persisted to Unity Catalog, so the premise of a catalog privilege problem does not apply. The failure comes from the object simply not existing in the second session's namespace, not from a missing USE CATALOG grant. A privileges issue would produce a permission error rather than TABLE_OR_VIEW_NOT_FOUND.

  • ✓

    The view was created as a temporary view, which is scoped to the notebook or session that created it, so a new query tab cannot resolve it.

    Why this is correct

    Temporary views in Databricks SQL are session-scoped objects. They exist only for the duration of the session or notebook that created them and are not registered in Unity Catalog. A different query tab or SQL editor session cannot see the view, which explains the resolution failure when the second tab attempts to query monthly_sales.

  • ✗

    The aggregated alias total_revenue conflicts with a reserved keyword, so the view was dropped automatically after creation.

    Why it's wrong here

    total_revenue is not a reserved keyword in Databricks SQL, and even if an alias collided with a keyword it would cause a parse error at creation time, not silent removal. Databricks does not auto-drop views due to alias naming. The error is about the view being unresolvable in a new session, not about column naming.

  • ✗

    The CREATE OR REPLACE TEMPORARY VIEW statement silently failed because the underlying sales.orders table lacks a primary key.

    Why it's wrong here

    Delta and Unity Catalog tables do not require primary keys to be queried or aggregated. The CREATE OR REPLACE TEMPORARY VIEW would have succeeded if permissions were valid, since GROUP BY does not depend on any key constraint. Lack of a primary key is not a reason for the view to disappear from another session.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

About these practice questions

This Databricks-DA-Assoc question is part of Courseiva's 291-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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-DA-Assoc 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-DA-Assoc exam.