'Data masking in Azure built in synapse views

I am having a azure synapse built in view, this view is giving me user profile information like userid, name and address etc. I would like to add data masking logic to anonymise the users. would it be possible as I know we can put the data masking logic on tables but not on views, please let me know any alternative solution



Solution 1:[1]

You can create a view on top on a table in which you define masked fields

Whenever you execute the view as an Admin you will see unmasked data and when you will query the view from logging in via Masked User you will see Masked data

So, masking can't be directly defined in a view but if you need to mask anything in a view then you should mask the required fields in the underlying table instead, that way you will be able to achieve masking with a view

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Pratik Somaiya