Dynamic Masking with Microsoft Fabric

When I recently posted about CDC I stated that Dynamic Masking on Delta Tables was not available. It is possible with Microsoft Fabric Warehouse Tables however.

SQL

CREATE TABLE dbo.EmployeeData (
    EmployeeID INT
    ,FirstName VARCHAR(50) MASKED WITH (FUNCTION = 'partial(1,"-",2)') NULL
    ,LastName VARCHAR(50) MASKED WITH (FUNCTION = 'default()') NULL
    ,Salary DECIMAL MASKED WITH (FUNCTION = 'default()') NULL
    ,email VARCHAR(256) NULL
    );

INSERT INTO EmployeeData
SELECT [EmployeeKey]
,[FirstName]
,[LastName]
,(BaseRate* 1950)
,[EmailAddress]
FROM [Mywarehouse].[dbo].[DimEmployee]

SELECT * FROM dbo.EmployeeData;
Unmasked Data

image

Masked Data

image

 We can confirm this is a Delta Table


I have, so far, been unable to set ChangeDataCapture for this table however conceptually I think this is not what the warehouse is for. Rather the Warehouse is the destination for your Gold data layer and CDC would be most beneficial in earlier phases of the medallion framework. However, this does mean I cannot confirm the status of Dynamic Masking on the change data capture. Still an exciting evolution for Delta Tables.

Links

Comments

Popular posts from this blog

Semantic Model Building Using Direct Lake

So, You Want to Pass the DP-600 Exam.