gpt4 book ai didi

database - 共享数据库上的数据屏蔽策略错误

转载 作者:行者123 更新时间:2023-12-05 05:52:59 26 4
gpt4 key购买 nike

我正在尝试在我们只能访问 View 的共享数据库上应用数据屏蔽策略。但是我也向数据库提供了授权。我无法应用此屏蔽策略

这是我的代码

create or replace masking policy Policy_name as (val string) returns string ->
case
when current_role() in ('SECURITYADMIN') then val
else '*********'
end;

alter table if exists TABLE_NAME modify column PHN_NUMBER set MASKING POLICY Policy_name PHN_NUMBER;

错误:

SQL execution error: Creating masking_policy on shared database 'DATABASE_NAME' is not allowed.

最佳答案

limitation of DATA MASKING section说你不能这样做。

A data sharing consumer cannot apply a masking policy to a shared database or table. As a workaround, import the shared database or table and apply the masking policy to a local view on that shared table column.

关于database - 共享数据库上的数据屏蔽策略错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69993417/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com