entechlog / dbt-snow-mask

This repository contains source code for dbt package dbt_snow_mask.
https://hub.getdbt.com/entechlog/dbt_snow_mask/latest/
GNU General Public License v3.0
60 stars 25 forks source link

Apply masking policy with FORCE keyword #46

Closed il-dat closed 2 years ago

il-dat commented 2 years ago

Describe the feature: Snowflake is now allowing us to run apply masking rules with FORCE keyword: ALTER TABLE...ALTER COLUMN...SET MASKING POLICY ...FORCE

This is opening the door for us to use this keyword into the APPLY MASKING POLICY functionalities.

With this feature, we'll remove the annoying point where we need to unset rules firstly then to re-apply rules again. While in development, it's a great benefit when performing CLONE operation, we do not need to care about 'unset' anymore.

Suggested Solution: Add variable use_force_applying_masking_policy: false. If this value turned into true then run apply masking policies with FORCE keyword

entechlog commented 2 years ago

@il-dat ,

il-dat commented 2 years ago

Hi @entechlog, sorry I should do that at the beginning. Please help to see below: Let me know if anything else I need to perform as further. Thanks

dbt environment:

dbt version: 1.0.8
python version: 3.9.6
python path: /Users/.../snow_mask_env/bin/python3
os info: macOS-12.6-arm64-arm-64bit
Using profiles.yml file at /Users/.../.dbt/profiles.yml
Using dbt_project.yml file at /Users/.../dbt-snow-mask/integration_tests/dbt_project.yml

Configuration:
  profiles.yml file [OK found and valid]
  dbt_project.yml file [OK found and valid]

Following the test steps and results:

entechlog commented 2 years ago

Thank You for the test details, I will go ahead and merge it to develop and create a release candidate

entechlog commented 2 years ago

Here is the RC, will wait for a day and then will do the production release

https://github.com/entechlog/dbt-snow-mask/releases/tag/0.2.3rc1

entechlog commented 2 years ago

This has been release now https://github.com/entechlog/dbt-snow-mask/releases/tag/0.2.3, Should reflect in dbt hub in a couple of hours

Thanks for the contribution and closing the issue now