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

Accept users, groups, or roles in grants config for dbt-redshift #4193

Open
dbeatty10 opened this issue Oct 5, 2023 · 2 comments
Open

Accept users, groups, or roles in grants config for dbt-redshift #4193

dbeatty10 opened this issue Oct 5, 2023 · 2 comments
Assignees
Labels
adapters blocked_by_dev Awaiting merge of PR with associated functionality content Improvements or additions to content improvement Use this when an area of the docs needs improvement as it's currently unclear

Comments

@dbeatty10
Copy link
Contributor

There might be multiple pages that need updating related to dbt-labs/dbt-redshift#626

Here is at least one:

@dbeatty10 dbeatty10 added content Improvements or additions to content improvement Use this when an area of the docs needs improvement as it's currently unclear idea Proposes an idea for new content adapters labels Oct 5, 2023
@matthewshaver matthewshaver self-assigned this Oct 9, 2023
@matthewshaver
Copy link
Contributor

Pull request this is attached to is still open. Adding blocked by dev label until it is merged.

@matthewshaver matthewshaver added the blocked_by_dev Awaiting merge of PR with associated functionality label Oct 9, 2023
@dbeatty10 dbeatty10 changed the title Docs Changes Needed from dbt-redshift PR #626 Accept users, groups, or roles in grants config for dbt-redshift Nov 10, 2023
@runleonarun runleonarun removed the idea Proposes an idea for new content label Mar 13, 2024
@mirnawong1
Copy link
Contributor

mirnawong1 commented Jul 10, 2024

PR raised by another contributor in this pr: https://github.com/dbt-labs/docs.getdbt.com/pull/5739/files, and below is their suggested content:

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:

{{ 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:

In order to grant USAGE, use post-hooks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adapters blocked_by_dev Awaiting merge of PR with associated functionality content Improvements or additions to content improvement Use this when an area of the docs needs improvement as it's currently unclear
Projects
None yet
Development

No branches or pull requests

4 participants