Skip to content

Commit

Permalink
fix get_show_grant_sql macro
Browse files Browse the repository at this point in the history
  • Loading branch information
soksamnanglim committed Nov 1, 2023
1 parent 343565f commit aeadcac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dbt/include/redshift/macros/adapters/apply_grants.sql
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ where exists(
select *
from information_schema.table_privileges tp
where tp.grantee=g.groname
and tp.table_schema=replace(split_part('{{ relation }}', '.', 2), '"', '')
and tp.table_name=replace(split_part('{{ relation }}', '.', 3), '"', '')
and LOWER(tp.privilege_type)=p.privilege_type
)
Expand All @@ -90,6 +91,7 @@ where exists(
select *
from svv_relation_privileges rp
where rp.identity_name=r.role_name
and rp.namespace_name=replace(split_part('{{ relation }}', '.', 2), '"', '')
and rp.relation_name=replace(split_part('{{ relation }}', '.', 3), '"', '')
and LOWER(rp.privilege_type)=p.privilege_type
)
Expand Down

0 comments on commit aeadcac

Please sign in to comment.