Privilege gets dropped after each model run in snowflake

In snowflake, I have given select privilege on customer table to one newly created role named as test-users.

So whenever i run or build my model populating customer table i found that this select privilege gets dropped.

How can i preserve all the privileges on my table even after each run/build command

Hi Sushil,

This behavior is expected as dbt during each run dbt deletes the table and creates it anew. Setting privileges/grants in your dbt project itself will probably do the trick in your case

[Disclaimer: I am an independent advisor and am not associated with DBT. The information provided here is based on my personal knowledge and experience. Please consult official DBT documentation or support channels for authoritative guidance.]

Note: @srathi originally posted this reply in Slack. It might not have transferred perfectly.

Thanks a ton for quick reply. This helped me!