Reitse
1 year agoMost Valuable Professional
Status:
Completed
Fabric SQL Database dynamic data masking doesn't work
I've been doing some testing with Dynamic Data Masking to try and find out if/how it works.
To do that, I'm running a script that works perfectly fine in SQL Server and Azure SQL Server.
But it fails to mask the data in Fabric SQL Database. I got some confirmation yesterday at SQL Konferenz that this really looks like a bug and therefore I'm sharing the full code with you to reproduce and hopefully find a solution.
DROP TABLE IF EXISTS dbo.MaskingTable;
CREATE TABLE dbo.MaskingTable (
ID int IDENTITY(1,1),
FirstName varchar(20) MASKED with (FUNCTION = 'Partial(3,"AbC",1)') NOT NULL,
LastName varchar(30) MASKED with (FUNCTION = 'default()') NOT NULL,
Email varchar(40) MASKED WITH (FUNCTION = 'email()') NOT NULL,
SecretDate datetime MASKED WITH (FUNCTION = 'datetime("Y")')NOT NULL,
TopSecretNumber int MASKED with (FUNCTION = 'RANDOM(1,1000)')
)
INSERT INTO dbo.MaskingTable (FirstName, LastName, Email, SecretDate, TopSecretNumber)
VALUES
SELECT *
FROM dbo.MaskingTable
CREATE USER NoUnMask WITHOUT LOGIN;
GRANT SELECT ON dbo.MaskingTable TO NoUnMask;
EXECUTE AS USER = 'NoUnMask'
SELECT *
FROM dbo.MaskingTable
REVERT;
5 Comments
- sukkaurMicrosoft EmployeeHi Reitse, Just want to let you know that masking works fine. Please try it with an actual user by giving your user connect access to the SQL database artifact in fabric. You are not seeing the result because you using execute as user for this. Thanks Sukhwant
- ReitseMost Valuable ProfessionalHi Sukhwant, So to test this functionality I can't use a method that's been in use for ages? If execute as doesn't work in Fabric SQL (and it does in Azure SQL and SQL Server), it should return an error instead of an unwanted result. I've seen the execute as clause being used in stored procedures as well in the past. If people assume this will work in Fabric SQL too, they might be in for a surprise after migrating. I hope this one can be fixed or that there will be clear documentation on the fact that this doesn't work.
- JakubSzymaszekMicrosoft EmployeeStatus changed:NewtoPlanned
- sukkaurMicrosoft EmployeeStatus changed:PlannedtoCompleted
Recent ideas
Set default x axis scrolling position
Enable selection of the default scroll position for the x-axis on a chart. For example, on a line chart with dates as the x-axis, when not all of the data can display in the view at once, the scroll...Lisa_Krieg1 hour agoNew MemberNeeds Votes7.8KViews1154likes104CommentsTable Visual — Rounded Corners and Pill-Style Cell Backgrounds
Add the option to display cell background colors as rounded rectangles or pill-shaped labels within the native Table visual. Currently, applying a background color fills the entire cell with a solid...urawizardharry2 hours agoRegular VisitorNew3Views0likes0CommentsAdd Global Alignment Controls for Power BI Matrix Values and Headers
Please add a global alignment setting for Matrix visuals that allows users to apply the same alignment, left, center, or right, to all measure columns at once. This should apply to column headers, d...AaronReasoner3 hours agoNew MemberNew1View0likes0CommentsCase sensitive-insensitive option in Power BI
There should be an option in Power BI for the data in the columns to be either case sensitive or insensitive. When one deals with data involving client names or entity names, case sensitivity-sinsens...sohail_syed_moh3 hours agoNew MemberNeeds Votes2.3KViews124likes11CommentsGoverned & Regulation for Publish to Web feature
Notifying certain group of individuals if there is any enhancements performed on the semantic model which already hold an active Publish to Web code in place. This ensure in having more security and...Jaswanth_UNHCR3 hours agoNew MemberNew1View0likes0Comments