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?
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.