Last active
July 10, 2024 18:15
-
-
Save vvgsrk/10f74f68490a84ea7fe90d906a2ac3bd to your computer and use it in GitHub Desktop.
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') | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment