Your company manages a payroll application for its customers worldwide. The application uses an Azure SQL database named DB1. The database contains a table named Employee and an identity column named EmployeeId.
A customer requests the EmployeeId be treated as sensitive data.
Whenever a user queries EmployeeId, you need to return a random value between 1 and 10 instead of the EmployeeId value.
Which masking format should you use?
Click on the arrows to vote for the correct answer
A. B. C.B
https://docs.microsoft.com/en-us/azure/sql-database/sql-database-dynamic-data-masking-get-started-portalTo mask sensitive data, Azure SQL Database provides several masking formats that can be used depending on the type of data being masked. In this scenario, the goal is to mask the identity column "EmployeeId" by returning a random value between 1 and 10 whenever a user queries it.
Out of the given options, the appropriate masking format to use in this scenario is the "number" masking format.
The "number" masking format allows you to replace numerical data with a random number within a specified range. This is achieved by using the "RAND()" function in a masking rule. The "RAND()" function returns a random value between 0 and 1, which can be multiplied by the desired range and then rounded to an integer to get a random number within the range.
Here's an example of how to use the "number" masking format to mask the "EmployeeId" column:
sqlALTER TABLE Employee ALTER COLUMN EmployeeId ADD MASKED WITH (FUNCTION = 'number', LOW_VALUE = 1, HIGH_VALUE = 10)
In this example, the "ALTER TABLE" statement is used to modify the "EmployeeId" column by adding a masking rule. The "MASKED" keyword specifies that a masking rule should be applied to the column. The "FUNCTION = 'number'" parameter specifies that the "number" masking format should be used. The "LOW_VALUE" and "HIGH_VALUE" parameters specify the range of random values that should be returned when a user queries the column. In this case, the range is between 1 and 10.
Once this masking rule is applied, whenever a user queries the "EmployeeId" column, a random value between 1 and 10 will be returned instead of the actual "EmployeeId" value.
Therefore, the correct answer is B. number.