-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Snow mask version 0.1.8 or 0.1.9 introduces code that attempts to "create schema if not exists" prior to creating a masking policy, this is a permission we don't want to give to the dbt role #32
Comments
@jcbmllgn , Thank you for raising this issue. I believe the issue is caused after https://github.com/entechlog/dbt-snow-mask/releases/tag/0.1.8 release. I will review this one and get back. |
Thanks for the quick response @entechlog! Again, really appreciate the work you put into this package 🙌 Out of curiosity, what was the intent behind this workflow change to run |
@jcbmllgn, It was added part of adding common db and schema for masking policy. So when creating the masking policy the process won't error out if there is no schema https://github.com/entechlog/dbt-snow-mask/pull/25/files#diff-cf387b66a67d7cd5ab4c7c4355916bda050a60d0489757a646d76a59e4aa897bR29 |
@jcbmllgn So based on the above lines, we still need this logic, but I can add a flag for create schema and enable it by default in package but users who dont want dbt to create schema and disable in the project. How does that sound? |
That sounds good to me. Thank you! |
@jcbmllgn , I have created a release candidate for this change here https://github.com/entechlog/dbt-snow-mask/releases/tag/0.2.0rc2. Do you have sometime to test this out before I create the final release ? |
Thanks for the very speedy turnaround! I just tested the release candidate and it worked for me. |
Thank You @jcbmllgn for validating the change. I have just released a new version 0.2.0 and should be reflected in dbt hub in about an hour OR so. Closing the issue now. |
Hello, first of all thank you for making this great package! We've happily been using it in production for quite a while now.
Issue summary
We tried upgrading from version 0.1.7 to 0.1.9 today, however, we experienced a failure when trying to create a new masking policy.
After upgrading to 0.1.9 it seems snow mask first runs
create schema if not exists db_name.schema_nam
prior to trying to create the masking policy. However, the Snowflake role that we use to execute DDL does not have permission to create a new schema in this database, we very much do not want dbt to be creating schemas in ourRAW
database which is the database context for this failure. Additionally, we did not see anything in the release notes about this new behavior.I found this out by looking at the full context in the
dbt.log
file, below is the relevant excerpt:I added a comment on the relevant line, see the spot where it says
HERE IS THE ISSUE
.Question for the snow mask maintainers
Ideally snow mask would not try to create a table, this is pretty surprising behavior. Can this behavior be configurable behavior?
The text was updated successfully, but these errors were encountered: