nerdexam
Microsoft

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 | #…

Submitted by ricky.ec· Mar 6, 2026Implement a secure environment

Question

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 Customer_Phone column. The mask must meet the following requirements: - The first six numerals of each customer's phone number must be masked. - The last four digits of each customer's phone number must be visible. - Hyphens must be preserved and displayed. How should you configure the dynamic data mask? To answer, select the appropriate options in the answer area. Answer:

Exhibits

DP-300 question #51 exhibit 1
DP-300 question #51 exhibit 2

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)
ParameterMeaning
exposed_prefix# of chars to show from the left (unmasked)
padding_stringFixed 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:

  • xxx masks the first three digits
  • - preserves the first hyphen (a literal character in the padding)
  • xxxx masks 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

#Dynamic Data Masking#Azure SQL Database#Data Security#Data Privacy

Community Discussion

No community discussion yet for this question.

Full DP-300 Practice