-
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
Feature request: Handle updated policies automatically #6
Comments
Just got aware of the fact that this is ak known limitation. Nevertheless, I think that handling this as an open issue is probably a good idea,so we can discuss ideas here... |
I ran into this as well and had to choose between the IF EXISTS clause or the OR REPLACE clause. Maybe a separate Update procedure that unapplies, drops, then creates? |
|
I'm coming to the party late so maybe things have changed in Snowflake since previous comments. Snowflake has an ALTER MASKING POLICY command which allows you to change the masking policy without having to go through the "unapplied, deleted, created (or CREATE OR REPLACE...) and applied again" process. I'm still new to dbt, but I was able to build a macro that checks for the existence of the masking policy and does a CREATE or ALTER, depending on the result of the check. Perhaps something like that could be added to the package. |
Hello @mjahammel, I am open for suggestions and enhancements to the package. Do you mind sharing the source code for your macro, perhaps we can check and work together to see if this enhancement can be implemented ? |
@entechlog , I will create a pull request with the new macro and an implementation of it. |
Hi, I found this looking for a more elegant solution, but in case it helps, I'm solving this by adding both
First time you run the macro in a new environment, it will run both, the create and alter, following runs, it will run only the alter as it is already created. |
Currently, if an existing policy is updated, it needs to be unapplied, deleted, created (or CREATE OR REPLACE...) and applied again.
This is imho a manual process which is cumbersome when applied to production environments.
It would be great if we could find a solution which handles these things automatically.
The text was updated successfully, but these errors were encountered: