# Privilege gets dropped after each model run in snowflake

**URL:** <https://discourse.getdbt.com/t/privilege-gets-dropped-after-each-model-run-in-snowflake/10439>\
**Category:** Help\
**Created:** [October 20, 2023, 11:55am UTC](https://discourse.getdbt.com/t/privilege-gets-dropped-after-each-model-run-in-snowflake/10439 "2023-10-20T11:55:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sushil07.blockchain](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@sushil07.blockchain](https://discourse.getdbt.com/u/sushil07.blockchain)\
**Post date:** [October 20, 2023, 11:55am UTC](https://discourse.getdbt.com/t/privilege-gets-dropped-after-each-model-run-in-snowflake/10439/1 "2023-10-20T11:55:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![a\_slack\_user](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/a_slack_user/32/1629_2.png) [@a\_slack\_user](https://discourse.getdbt.com/u/a_slack_user)\
**Post date:** [October 20, 2023, 12:08pm UTC](https://discourse.getdbt.com/t/privilege-gets-dropped-after-each-model-run-in-snowflake/10439/2 "2023-10-20T12:08:46Z")

</div>

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 [https://docs.getdbt.com/reference/resource-configs/grants](https://docs.getdbt.com/reference/resource-configs/grants)

`[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](https://getdbt.slack.com/archives/CBSQTAPLG/p1697803718542529?thread_ts=1697802971.562689&cid=CBSQTAPLG). It might not have transferred perfectly.

---

<div class="post-metadata">

**Author:** ![sushil07.blockchain](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@sushil07.blockchain](https://discourse.getdbt.com/u/sushil07.blockchain)\
**Post date:** [October 20, 2023, 1:30pm UTC](https://discourse.getdbt.com/t/privilege-gets-dropped-after-each-model-run-in-snowflake/10439/3 "2023-10-20T13:30:53Z")

</div>

Thanks a ton for quick reply. This helped me!
