From 6c4c89d216f0917d36afe4d050d314915feb951b Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Fri, 21 Apr 2023 17:44:30 -0600 Subject: [PATCH 1/4] Redshift supports user grants but not groups --- .../docs/reference/resource-configs/grants.md | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/website/docs/reference/resource-configs/grants.md b/website/docs/reference/resource-configs/grants.md index c5c3b9e3ece..226aa32c147 100644 --- a/website/docs/reference/resource-configs/grants.md +++ b/website/docs/reference/resource-configs/grants.md @@ -248,7 +248,28 @@ models:
-* No special requirements at this time. +* Granting to / revoking from is only fully supported for Reshift users (not groups). + + +⚠️ Although groups can have grants by explicitly adding a `group ` prefix, they will not be revoked when removed from the config; revoking must be done manually outside of dbt. + +For example: + +```sql +{{ config(grants = {'select': ['group finance_department']}) }} +``` + + + +```yml +models: + - name: specific_model + config: + grants: + select: ['group finance_department'] +``` + +
From 5d7901150b84f4d38f0de4f46d3abba7a2d4341b Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Fri, 21 Apr 2023 18:05:20 -0600 Subject: [PATCH 2/4] Update Redshift notes --- .../docs/reference/resource-configs/grants.md | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/website/docs/reference/resource-configs/grants.md b/website/docs/reference/resource-configs/grants.md index 226aa32c147..18ca5ea51e8 100644 --- a/website/docs/reference/resource-configs/grants.md +++ b/website/docs/reference/resource-configs/grants.md @@ -250,27 +250,6 @@ models: * Granting to / revoking from is only fully supported for Reshift users (not groups). - -⚠️ Although groups can have grants by explicitly adding a `group ` prefix, they will not be revoked when removed from the config; revoking must be done manually outside of dbt. - -For example: - -```sql -{{ config(grants = {'select': ['group finance_department']}) }} -``` - - - -```yml -models: - - name: specific_model - config: - grants: - select: ['group finance_department'] -``` - - -
From be414387b155e7c3dcbc207dc80ff9f7091b86bf Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Fri, 21 Apr 2023 18:06:09 -0600 Subject: [PATCH 3/4] Fix misspelling --- website/docs/reference/resource-configs/grants.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/resource-configs/grants.md b/website/docs/reference/resource-configs/grants.md index 18ca5ea51e8..334846e9d52 100644 --- a/website/docs/reference/resource-configs/grants.md +++ b/website/docs/reference/resource-configs/grants.md @@ -248,7 +248,7 @@ models:
-* Granting to / revoking from is only fully supported for Reshift users (not groups). +* Granting to / revoking from is only fully supported for Redshift users (not groups).
From b758a409d745d339656bfeac8ff489ee60bb8f3e Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Sun, 23 Apr 2023 07:10:01 -0600 Subject: [PATCH 4/4] dbt-redshift supports user grants but not group or role --- website/docs/reference/resource-configs/grants.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/resource-configs/grants.md b/website/docs/reference/resource-configs/grants.md index 334846e9d52..ed81c8f2f92 100644 --- a/website/docs/reference/resource-configs/grants.md +++ b/website/docs/reference/resource-configs/grants.md @@ -248,7 +248,7 @@ models:
-* Granting to / revoking from is only fully supported for Redshift users (not groups). +* Granting to / revoking from is only fully supported for Redshift users (not groups or roles).