Reputation: 447
I want to select a user only with a given role. I gone through the document but didnt get how to filter rows for a particular role.
DATABASE: SNOWFLAKE
Upvotes: 0
Views: 3876
Reputation: 6279
You should use the "SNOWFLAKE" database to get what you're looking for. If you have access to the database there is a view called "GRANTS_TO_USERS" which, assuming I understand your question, should have what you need:
For example
select *
from "SNOWFLAKE"."ACCOUNT_USAGE"."GRANTS_TO_USERS"
where role = 'SYSADMIN'
and grantee_name = 'SIMON'
Upvotes: 5