OK I spent some time looking at the documentation today and I don’t think that’s currently supported with the grants out of the box, so you have a few options:
- continue to use post hooks to do grants as described in this blog post: Updating our permissioning guidelines: grants as configs in dbt Core v1.2 | dbt Developer Blog
- open an issue on the dbt core repo describing your use case, as it could be a future enhancement (you should do this no matter what)
- consider creating a custom version of the macro that handles the grant logic. You can override almost all of dbt’s functionality (see Did you know? dbt ships with its own project!), so if you made a custom version of the grants macro you could make it do different things based on the target. Hand-wavy but an option to consider.