[Obsolete] The exact grant statements we use in a dbt project

I appreciate the example on adding logic to the macro to run different hooks based on prod or dev using {% if target.name == 'prod' %}. That’s perfect and what I was looking for. I can extend that to have different sets of grant statements for each target name. And I see your comment over at my post has the same code too.

I did get lost near the end. :sweat_smile: I am not sure how the very last example:

On the other hand, it can also be a good idea to grant privileges on your dev schema and relations to your BI tool

is different from the last example in your original post where the grants do run on all schema?