Data Anonymization using Dynamic Data Masking | Snowflake

preview_player
Показать описание
Prerequisite:
----------------------
Data Masking in Snowflake

Code is posted in the comment section.

Check this playlist for more AWS Projects in Big Data domain:
Рекомендации по теме
Комментарии
Автор

Code:

use role SYSADMIN;

drop database if exists ramu;

create database ramu;

use ramu;


create or replace table number, employee_name varchar(200),
empl_password varchar(200),
dept varchar(10));

-- insert values into employee table
insert into ramu.PUBLIC.employee_info values(1, 'Soham', 'Soham123', 'HR'),
(2, 'Rajdeep', 'Raja456@', 'Marketing'),
(3, 'Ranjith', 'Jiohi12', 'HR'),
(4, 'Sudeshna', 'helloworld12', 'Support'),
(5, 'Surojit', 'bmps123', 'BI'),
(6, 'Sayan', 'jalo1i123', 'Management');

select * from ramu.PUBLIC.employee_info;


USE ROLE ACCOUNTADMIN;


create or replace masking policy sensitive_info_masking_string as (val STRING) returns STRING ->
case
when current_role() in ('ACCOUNTADMIN') then val
else sha2(val)
end;

ALTER TABLE IF EXISTS ramu.PUBLIC.employee_info MODIFY COLUMN empl_password SET MASKING POLICY


select * from ramu.PUBLIC.employee_info;


USE ROLE SYSADMIN;

select * from ramu.PUBLIC.employee_info;

select * from ramu.PUBLIC.employee_info where employee_name='Soham' and

KnowledgeAmplifier
Автор

Bro, can you please make a video on end to end project using snowflake and aws services

Buzzingfact