on-internet
← Community

How to recursively traverse a Snowflake role grant hierarchy in Python?

Stack Overflow ·

Has anyone written Python code to traverse a Snowflake Role hierarchy? A role can be granted a role which can be granted a role. Nested roles are possible. In Python, I want to start with a specific role Query all grants to the role that are roles store each of those in a unique list for each of those roles execute a SQL statement that will query all roles granted to that role and traverse down the hierarchy, not missing a single role and also not traversing a role that has already been queried or that is in the list to be queried Something recursive to crawl this tree using Python would be he

Comments

Sign in or sign up to comment and upvote.

No comments yet.