Snowflake GRANT 对某个 ROLE 拥有的所有 SCHEMAS 的使用

发布于 2025-01-10 01:10:22 字数 217 浏览 3 评论 0原文

在我的 Snowflake 数据库中,我有一个报告角色,请求访问架构所有者子集拥有的架构子集。这是一个有效的请求,因为我可以看到它减少了查询界面中的架构混乱。

在 Snowflake 中是否可以将某个角色(例如:abc_role)拥有的所有模式的权限授予另一个角色(例如:xyz_role)?

我在 Snowflake 中看到,我们可以授予整个数据库中所有模式的权限,但不受模式所有者的限制。

In my Snowflake database, I have a reporting ROLE requesting access to a subset of SCHEMAS owned by a subset of schema OWNERS. This is a valid request as I can see it reduces the schema clutter in their query interface.

Is it possible in Snowflake to grant privileges on ALL schemas owned by a certain role (Ex: abc_role) to another role (Ex: xyz_role)?

I see in Snowflake we can grant privileges on ALL schemas in the entire database but not restrict by the schema owner.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小嗲 2025-01-17 01:10:22

您需要自己构建命令,grant 语句中没有 WHERE 选项。

只需运行

show schemas;

然后构建您的授予语句

select — construct statement
from table(result_scan(last_query_id())) 
where “owner” = value;

You’ll need to construct the commands yourself, there is no WHERE option in a grant statement.

Just run

show schemas;

and then construct your grant statements with

select — construct statement
from table(result_scan(last_query_id())) 
where “owner” = value;
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文