Decide to Drop the Object Tags¶
dbt-tags supports a macro to help us to clean up the DWH Object Tags which might be redundant or accidentally created:
drop_tags (source)
Usage¶
See doc in yml
How does it work?¶
For example, you'd like to drop tags that were wrongly created in the schema named analytics.demo.
Let's run the command below:
-
It scans all the Object Tags that were created in
analytics.demoschema. Behind the scene script is: -
If exists any tags:
- Create a dummy masking policy function (A)
- For each object tag:
- Set masking policy to tag with the above (A) with Force
- Unset masking policy from tag with (A)
- Drop the tag
- Drop (A)
-
Done!