雪花中的出站权限是什么

what are outbound privileges in snowflake

雪花grant ownership documentation中有引用"outgoing privileges."

什么是“传出权限?

这是可选参数的一部分"copy/revoke current grants."

它说,"Transfers ownership of an object along with a copy of any existing outbound privileges on the object."

我想知道 "outbound privileges" 是什么。

编辑: 这是我运行的测试。我没看出区别。

create or replace view sandbox.test_schema.my_test_view
as
select 1 a;

grant ownership on view sandbox.test_schema.my_test_view to role ABC

show grants on view sandbox.test_schema.my_test_view

特权=所有权; granted_to=角色; grantee_name=字母表; grant_option=真; granted_by=ABC

如果我添加副本 g运行ts

如果我 运行 除了复制 g运行t 特权

之外,其他一切都完全一样
grant ownership on view sandbox.test_schema.my_test_view to role ABC copy current grants

在视图上显示 g运行ts 的结果是相同的。

是否有 "copy current grants" 有所不同的示例?

"Outbound privileges" 表示对象的现有特权(当前授权)。

所以你更新了你的样本并询问是否有一个例子表明 "copy current grants" 有所不同?

假设还有另一个角色 (DEF),我们在示例视图上授予了 select:

create role DEF;
grant select on sandbox.test_schema.my_test_view to role DEF;

在这种情况下,以下命令将失败并显示 "SQL execution error: Dependent grant of privilege 'SELECT' on securable 'SANDBOX.TEST_SCHEMA.MY_TEST_VIEW' to role 'DEF' exists":

grant ownership on view sandbox.test_schema.my_test_view to role ABC;

解决这个问题:

1) 我们可以手动删除现有授权,然后重试第一个语句:

revoke select on sandbox.test_schema.my_test_view from role DEF;
grant ownership on view sandbox.test_schema.my_test_view to role ABC;

2) 我们可以自动删除现有的赠款:

grant ownership on view sandbox.test_schema.my_test_view to role ABC revoke current grants;

3) 我们可以在更改所有权的同时保留现有的赠款:

grant ownership on view sandbox.test_schema.my_test_view to role ABC copy current grants;

因此,如果对象上存在现有授权,"COPY/REVOKE current grants" 会有所不同。