We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae50122 commit 4e7558cCopy full SHA for 4e7558c
macros/grants/grant_internal_share_read.sql
@@ -12,6 +12,14 @@
12
{% set schemas = dbt_dataengineers_utils._grants_collect_schemas(exclude_schemas) %}
13
{% do log("Granting SELECT on all tables and views in all schemas for share: " ~ share_name ~ " (dry_run=" ~ dry_run ~ ")", info=True) %}
14
{% for schema in schemas %}
15
+ {% set grant_usage %}
16
+ grant usage on schema {{ database }}.{{ schema }} to share {{ share_name }};
17
+ {% endset %}
18
+ {% if dry_run %}
19
+ {% do log(grant_usage, info=True) %}
20
+ {% else %}
21
+ {% do run_query(grant_usage) %}
22
+ {% endif %}
23
{# Grant SELECT on all tables in schema #}
24
{% set grant_tables_sql %}
25
grant select on all tables in schema {{ database }}.{{ schema }} to share {{ share_name }};
0 commit comments