Decide to Unset Masking Policies¶
dbt-tags supports a macro to help us to perform Unset Masking Policy operation (1) from the Object Tags easily for a clean up purpose. Please note that we shouldn't run it (1) prior to Set Masking Policy operation (2) because we always run (2) with Force.
unapply_mps_from_tags (source)
Usage¶
See doc in yml
How does it work?¶
For example, you'd like to Unset Masking Policy from the tags that were 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 (A)
-
Done!