Courseiva
Data Governance →hardMultiple Choice

Databricks-DE-Pro Data Governance Practice Question

A data engineer is implementing column-level masking in Unity Catalog. They need to mask the 'email' column in the table 'prod.customers' such that only members of the 'hr_group' see the full email, while all other users see a masked version. The engineer creates a masking function and applies it using ALTER TABLE. Which statement correctly applies the mask?

⚠ Common exam trap

The trap here is using MODIFY COLUMN or adding the FUNCTION keyword, which are not part of the SET MASK syntax.

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

✓

ALTER TABLE prod.customers ALTER COLUMN email SET MASK prod.security.mask_email;

The correct syntax to apply a column mask in Unity Catalog is ALTER TABLE table_name ALTER COLUMN column_name SET MASK function_name, where function_name is a fully qualified function that returns the masked value. This ensures that the mask is applied consistently and only authorized users see the original data.

Answer analysis

Option-by-option breakdown

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

  • ✓

    ALTER TABLE prod.customers ALTER COLUMN email SET MASK prod.security.mask_email;

    Why this is correct

    This statement correctly applies a column mask using the fully qualified function name. The syntax ALTER COLUMN ... SET MASK is valid in Unity Catalog, and referencing the function with catalog.schema.name ensures it is resolved correctly. The mask will be applied to all queries unless the user is a member of the group specified in the function's logic.

  • ✗

    ALTER TABLE prod.customers ALTER COLUMN email SET MASK FUNCTION prod.security.mask_email;

    Why it's wrong here

    The keyword FUNCTION is not used in the SET MASK clause. The correct syntax is ALTER COLUMN column_name SET MASK function_name. Including FUNCTION would cause a syntax error, and the mask would not be applied as intended.

  • ✗

    ALTER TABLE prod.customers ALTER COLUMN email SET MASK mask_email;

    Why it's wrong here

    The syntax ALTER COLUMN ... SET MASK is not supported in Unity Catalog. The correct syntax uses SET MASK with the function name, but the function must be referenced with its fully qualified name and the column must be specified. This statement would fail because it omits the function's catalog and schema, and the keyword order is incorrect.

  • ✗

    ALTER TABLE prod.customers MODIFY COLUMN email SET MASK prod.security.mask_email;

    Why it's wrong here

    MODIFY COLUMN is used for changing data types or comments, not for applying masks. Unity Catalog uses ALTER COLUMN ... SET MASK for column masking. Using MODIFY COLUMN with SET MASK would result in a syntax error and the mask would not be applied.

About these practice questions

This Databricks-DE-Pro question is part of Courseiva's 267-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-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.