Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

grant usage on particular view in snowflake

I have more than 10+ views in my database(i.e. myDb) in snowflake with the role analyst.

Now, I have created a new role i.e. developer and I want to give

grant select on view <> to role developer

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

permission to one particle view(i.e test_view).

How can I grant access to one particular view in snowflake?

Note: consider the schema name public

>Solution :

You do it almost exactly how you have guessed. VIEWs are schemaObjectPrivileges

CREATE ROLE developer;

CREATE VIEW test.test.test_view AS SELECT 1 AS id;

GRANT SELECT ON VIEW test.test.test_view TO ROLE developer;

SHOW GRANTS TO ROLE developer;
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading