Skip to content
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

Update grants.md for Redshift roles and groups #5739

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion website/docs/reference/resource-configs/grants.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,22 @@ models:

<div warehouse="Redshift">

* Granting to / revoking from is only fully supported for Redshift users (not groups or roles).
By default granting to / revoking from is only applicable for Redshift users (not groups or roles).

To configure grants for roles or groups, they need to be clearly demarcated as such with a prefix:
- To grant access on a model to `role_analyst`, you need to specify them as `ROLE role_analyst`.
- To grant access on a model to `group_finance`, you need to specify them as `GROUP group_finance`.

General example:

```sql
{{ config(grants = {'select': ['ROLE role_analyst']}) }}
```

Redshift requires the USAGE permission to be granted on schemas for object permissions to be effective. Please refer to AWS's documentation for more context:
- [AWS Redshift SQL Reference - GRANT command](https://docs.aws.amazon.com/redshift/latest/dg/r_GRANT.html)

In order to grant `USAGE`, use [post-hooks](https://docs.getdbt.com/reference/resource-configs/pre-hook-post-hook).

</div>

Expand Down
Loading