i_am_cris
i_am_cris

Reputation: 627

Grant select on future views snowflake

How can I grant select on all future views in a schema or database. This works fine but I want the role to have access to all future views too:

grant select on view <schema>.<view> to role <role>;

Any ideas?

Upvotes: 2

Views: 8496

Answers (1)

leftjoin
leftjoin

Reputation: 38290

Grant on future objects like this (using ACCOUNTADMIN role):

Make sure USAGE is granted on database and schema:

GRANT USAGE ON DATABASE <database> TO ROLE <role>; 
GRANT USAGE ON SCHEMA <database>.<schema> TO ROLE <role>;

Grant select on future objects:

grant select on future tables [views] in schema <database>.<schema> to role <role>;
grant select on future views in schema <database>.<schema> to role <role>;

Upvotes: 4

Related Questions