Databricks-DA-Assoc Securing Data Practice Question
A data analyst is using Databricks SQL to query a table `main.sales.orders` that has a column `credit_card` containing sensitive data. The analyst needs to run a query that aggregates orders by region but must not see the actual credit card numbers. Which Unity Catalog feature should be used to mask the `credit_card` column for this analyst?
⚠ Common exam trap
Candidates often confuse row-level security with column-level masking; row-level security filters rows, while masking transforms column values.
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
✓
Column-level dynamic data masking using a user-defined function
Column-level dynamic data masking in Unity Catalog allows administrators to attach a masking function to a column. The function can return a masked value (e.g., '****') for unauthorized users while returning the actual value for authorized users. This enables the analyst to run aggregations without seeing sensitive data. Other options either do not address column masking or are not supported features.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Granting `SELECT` only on specific columns
Why it's wrong here
Unity Catalog does not support granting `SELECT` on individual columns. Privileges are at the table level. While you can create a view that selects only non-sensitive columns, that is not a direct column-level grant. The question asks for a feature to mask the column, not to restrict access to it. Column-level grants are not a feature of Unity Catalog.
- ✗
Using `REDACT` function in the query
Why it's wrong here
The `REDACT` function is not a built-in Databricks SQL function. While you could manually write a query that redacts the column, the requirement is to enforce masking for the analyst regardless of the query they write. A manual redaction in a query does not prevent the analyst from querying the column directly. Therefore, this is not a security feature.
- ✓
Column-level dynamic data masking using a user-defined function
Why this is correct
Column-level dynamic data masking allows you to apply a function to a column that transforms the data based on the querying user's identity or group. This masks sensitive values like credit card numbers while still allowing aggregations and queries. The analyst can run the aggregation without seeing the actual data. This is the recommended approach in Unity Catalog for column-level security.
- ✗
Row-level security using a dynamic view
Why it's wrong here
Row-level security filters rows, not columns. It would not hide the `credit_card` column; it would only restrict which rows are visible. The requirement is to mask the column values, not filter rows. Therefore, row-level security does not solve the problem. A dynamic view could be used to exclude the column, but that is not row-level security.
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 →
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.