Home / Data Analyst practice test / Executing queries using Databricks SQL and Databricks SQL Warehouses / Question

Databricks Data Analyst Associate · free practice question

A security team needs a view in Databricks SQL that applies row-level filtering based on the current querying user's identity and group membership. They…

Exam-style question on Executing queries using Databricks SQL and Databricks SQL Warehouses from the free Data Analyst practice test, with the answer and a full explanation below.

Updated November 10, 2026

Executing queries using Databricks SQL and Databricks SQL Warehouses

A security team needs a view in Databricks SQL that applies row-level filtering based on the current querying user's identity and group membership. They require no additional storage overhead and want the filtering logic to be evaluated dynamically at query time. Which view type should they use?

  1. AA standard (dynamic) view, which is virtual and computes its results at query execution time, so functions such as current_user() or is_member() resolve to the querying user and no data is stored
  2. BA materialized view with ROW FILTER and MASK clauses, which stores pre-computed results with the security filters embedded and resolves them against the querying user when the cached rows are read
  3. CA Streaming Table with a WHERE clause referencing current_user(), which processes data incrementally and applies the per-user row filter natively without caching results in Unity Catalog storage
  4. DA materialized view with TRIGGER ON UPDATE and current_user() in its WHERE clause, which refreshes the cached data when upstream tables change and resolves the user identity at each refresh
  5. EA Lakehouse Federation foreign table view with row security inherited from the source database, which applies the external system's policies natively and stores no data inside Unity Catalog
Answer & explanation

Correct answer: A

WHY A: Standard (dynamic) views evaluate their defining SQL at query time, so identity functions like current_user() or is_member() resolve to the actual querying user. This gives dynamic row-level security with zero storage cost, because a standard view is virtual and stores no data.

WHY NOT B: A materialized view physically caches pre-computed results, which is the storage overhead the team wants to avoid. Filtering embedded in a materialized view's definition is evaluated against a fixed refresh-time context, not per individual querying user.

WHY NOT C: Streaming Tables are append-based ingestion objects that store their data; they do not provide per-user row filtering at query time through a WHERE clause on current_user().

WHY NOT D: A materialized view with current_user() in the WHERE clause captures the refresh-time user's identity into a static stored snapshot, not the querying user's identity, and it still stores data.

WHY NOT E: This approach relies on the external database's security and does not give Unity Catalog-level governance over row filtering by the Databricks user's identity and group membership.

Take the full Data Analyst practice test free →

Would you pass today?

This question is one of 45 in the free, timed Databricks Data Analyst Associate practice test. Take it and get a section-by-section score.

Start the free test →