DP-300 · Question #51
Hotspot Question You have an Azure SQL database that contains a table named Customer. Customer has the columns shown in the following table. You plan to implement a dynamic data mask for the…
The correct answer is The dynamic data mask for the Customer_Phone column must be configured with an Exposed Prefix of 0. = Yes; The dynamic data mask for the Customer_Phone column must be configured with a Padding String of 'xxx-xxxx'. = Yes; The dynamic data mask for the Customer_Phone column must be configured with an Exposed Suffix of 5. = Yes. Azure SQL Dynamic Data Masking - Partial Mask Explanation Background: The partial() Masking Function Azure SQL's partial() masking function has three parameters: `` partial(exposed_prefix, padding_string, exposed_suffix) ` | Parameter | Meaning | |---|---| | exposed_prefix | #…
Question
Exhibits
Answer Area
- The dynamic data mask for the Customer_Phone column must be configured with an Exposed Prefix of 0.Yes
- The dynamic data mask for the Customer_Phone column must be configured with a Padding String of 'xxx-xxxx'.Yes
- The dynamic data mask for the Customer_Phone column must be configured with an Exposed Suffix of 5.Yes
Explanation
Azure SQL Dynamic Data Masking - Partial Mask Explanation
Background: The partial() Masking Function
Azure SQL's partial() masking function has three parameters:
partial(exposed_prefix, padding_string, exposed_suffix)
| Parameter | Meaning |
|---|---|
exposed_prefix | # of chars to show from the left (unmasked) |
padding_string | Fixed string displayed in the middle (replaces masked content) |
exposed_suffix | # of chars to show from the right (unmasked) |
Assume the phone format is 123-456-7890 (12 characters total).
Statement 1 - Exposed Prefix of 0 -> Yes
The requirement says the first six numerals must be masked - nothing from the left should be visible. Setting prefix = 0 ensures zero characters are exposed from the start of the string. If prefix were 1 or more, digits would leak from the left.
Statement 2 - Padding String of 'xxx-xxxx' -> Yes
The padding string is the literal replacement shown in the middle. Using xxx-xxxx accomplishes two things:
xxxmasks the first three digits-preserves the first hyphen (a literal character in the padding)xxxxmasks the next four digits
Result: xxx-xxxx-7890 - hyphens visible, first 6 numerals hidden.
Statement 3 - Exposed Suffix of 5 -> Yes
The requirement is to show the last four digits plus preserve the hyphen before them. The rightmost 5 characters of 123-456-7890 are -7890. Setting suffix = 5 exposes exactly that: the separating hyphen + 4 digits.
If suffix were 4, only 7890 would show - the hyphen would be lost.
Final Masked Output
partial(0, 'xxx-xxxx', 5)
123-456-7890 -> xxx-xxxx-7890
Memory Tip
"Prefix/Suffix count characters, not digits." The hyphen counts as a character in the suffix. Always count from the raw string, not just the numerals, when setting prefix/suffix values.
Topics
Community Discussion
No community discussion yet for this question.

