This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE ROLE data_engineer; | |
-- Create external stage | |
CREATE OR REPLACE STAGE DP_DEV.STAGE.DP_DEV_DATA_INBOUND_TEST | |
STORAGE_INTEGRATION = DP_INGESTION_DEV | |
URL = 's3://dp-dev-data-inbound-test/' | |
; | |
-- List files in external stage | |
LIST @DP_DEV.STAGE.DP_DEV_DATA_INBOUND_TEST; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE NOTIFICATION INTEGRATION TASK_ERROR_NOTIFICATIONS | |
ENABLED = true | |
TYPE = QUEUE | |
NOTIFICATION_PROVIDER = AWS_SNS | |
DIRECTION = OUTBOUND | |
AWS_SNS_TOPIC_ARN = 'arn:aws:sns:eu-central-1:123456789012345:dp-tools-slack-notifier-alarm' | |
AWS_SNS_ROLE_ARN = 'arn:aws:iam::123456789012345:role/dp-tools-snowflake-tasks-error-notifications'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Masking Policy | Example | Role Name | |
---|---|---|---|
<DATA_TYPE>_MASK_<BUSINESS_UNIT_NAME> | NUMBER_MASK_EMPLOYEE | STRING_MASK_EMPLOYEE | DATE_MASK_EMPLOYEE | MASKING_ADMIN | |
<COLUMN_TYPE>_MASK_<BUSINESS_UNIT_NAME> | EMAIL_MASK_CUSTOMER | DOB_MASK_CUSTOMER | NAME_MASK_CUSTOMER | MASKING_ADMIN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Devlopment | |
USE ROLE dp_owner_dev; | |
/* | |
Table: schema_name.table_name | |
Columns: | |
column_name_1 | |
column_name_2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Devlopment | |
USE ROLE dp_owner_dev; | |
/* | |
Table: schema_name.table_name | |
Columns: | |
column_name_1 | |
column_name_2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT 'ALTER TABLE IF EXISTS ' || LOWER(table_catalog) || '.' || LOWER(table_schema) || '.' || LOWER(table_name) || ' MODIFY COLUMN ' || LOWER(column_name) || ' SET TAG ' || ' dp_governance.tags.customer_sensitive = ''add_source_name'';' AS set_statement, | |
'ALTER TABLE IF EXISTS ' || LOWER(table_catalog) || '.' || LOWER(table_schema) || '.' || LOWER(table_name) || ' MODIFY COLUMN ' || LOWER(column_name) || ' UNSET TAG ' || ' dp_governance.tags.customer_sensitive;' AS unset_statement | |
FROM dp_dev.information_schema.columns | |
WHERE table_name = 'TABLE_NAME_X' | |
AND column_name IN ('COLUMN_NAME_1', 'COLUMN_NAME_2', 'COLUMN_NAME_3') | |
; |