为什么雪花临时表的创建者不是它的所有者?

问题描述 投票:0回答:1

我正在运行以下代码。如您所见,我正在使用一个名为owner_bi_db的角色来创建一个临时表。

use database bi_db;
use schema [my_schema];

use role accountadmin;
drop table if exists _test;

use role owner_bi_db;
create temporary table _test as select 1 as t;

use role accountadmin;
show tables like '_test';

即使owner_bi_db是临时表的创建者,所有者最终还是DEV_ROLE。那怎么可能?我认为所有权始终授予该对象的创建者。无论是在临时表还是常规表上都一样。

enter image description here

snowflake-data-warehouse
1个回答
3
投票

啊!我找到了。我们在表的架构上有一个将来的[[ownership授予,它覆盖了create授予。有趣。

enter image description here
© www.soinside.com 2019 - 2024. All rights reserved.