Column Level Permissions

Creating a Virtual Dataset with Column Masking

Using query_user() or is_member(), a virtual dataset can be setup to allow for selective masking of columns for different users and/or groups without having to create multiple datasets.

Here is sample SQL for a virtual dataset with column masking:

SELECT 
    CASE 
        WHEN query_user() IN ('dave','mike') OR is_member('Accounting') THEN SSN
        ELSE CONCAT('XXX-XX-',SUBSTR(SSN,8,4))
    END
FROM ss.crm.dbo.employees

is_member() is case-insensitive. Alternatively, is_member(groupname, <case-sensitivity boolean>) can be used with the case-sensitivity flag set to true.


results matching ""

    No results matching ""