Comments (4)
access denied to create a PR for you all but apply_masking_policy_list_for_models.sql just needs a for loop after line 5 to fix the issue. Right now it's not looping through the nodes if operation_type = "apply".
{% macro apply_masking_policy_list_for_models(meta_key,operation_type="apply") %}
{% if execute %}
{% if operation_type == "apply" %}
{% for model in graph.nodes.values() %}
{% set model_id = model.unique_id | string %}
from dbt-snow-mask.
Hello @melissa-ellevation ,
- Can you please see if you can fork the repo, then it should give access to create PR ?
- Please make sure to attach the tests for the components which changed and everything else
- The repo already has some integration tests configured for contributors, Please see https://github.com/entechlog/dbt-snow-mask#how-to-do-an-integration-test- for more details
from dbt-snow-mask.
Hello @melissa-ellevation , Now I think more about it, this was by design. Idea was not to apply the masking policies globally by calling the apply command, rather apply them when the dbt run
for the model happens. Does this make sense ? Happy to discuss more about this and see if this is still a valid bug/PR
from dbt-snow-mask.
@entechlog WOW ok thank you for your patience with this, I figured out why this wasn't working for me. I had "{{dbt_snow_mask.create_masking_policy('models')}}"
running in on-run-end instead of as a post-hook to models and snapshots specifically.
I just updated the PR to include a note in the README, but this issue and PR can be closed whether or not you choose to add the note.
Didn't work:
on-run-start:
- "{{ dbt_snow_mask.create_masking_policy('sources')}}"
- "{{ dbt_snow_mask.create_masking_policy('models')}}"
on-run-end:
- "{{ dbt_snow_mask.apply_masking_policy('sources')}}"
- "{{ dbt_snow_mask.apply_masking_policy('models') }}"
Worked:
on-run-start:
- "{{ dbt_snow_mask.create_masking_policy('sources')}}"
on-run-end:
- "{{ dbt_snow_mask.apply_masking_policy('sources')}}"
models:
pre-hook:
- "{{ dbt_snow_mask.create_masking_policy('models')}}"
post-hook:
- "{{ dbt_snow_mask.apply_masking_policy('models') }}"
Thank you for your help and I'm sorry for the confusion!
from dbt-snow-mask.
Related Issues (20)
- Improvement: include sourcename or modelname in posthook to minimise overhead on run model tasks HOT 2
- Masking policy is not applied HOT 8
- apply policy to all models HOT 6
- Apply masking policy with FORCE keyword HOT 5
- Ability to update existing masking functions HOT 2
- Improvement: Allow for default dbt schema name generation HOT 2
- Improvement/bug: alert or warn when a masking policy specified does not exist
- dbt snow mask versioning HOT 2
- Feature Request: Make log optional
- Hyperlink to dbt's meta documetation HOT 1
- Post-hook executed as a pre-hook HOT 2
- Feature Request: Conditional Masking Policy HOT 3
- Applying policy on tables
- Conditional Masking Policy does not need `{{masked_column}}` in its body
- Insufficient privilege to create a masking policy
- Unapply policies should handle if the materialization exists or not
- on-run-start with 'models' parameter failed HOT 1
- Abillity to use macro on dynamic talbe
- Ability to pass in node and custom_schema_name HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dbt-snow-mask.