Skip to content

Commit 2c9a594

Browse files
github-actions[bot]BohuTANG
authored andcommitted
💬Generate LLM translations
1 parent d1006bb commit 2c9a594

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/cn/sql-reference/10-sql-commands/00-ddl/12-mask-policy/create-mask-policy.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@ CREATE [ OR REPLACE ] MASKING POLICY [ IF NOT EXISTS ] <policy_name> AS
2323
```
2424

2525
| 参数 | 描述 |
26-
|------------------------ |----------------------------------------------------------------------------------------------------------------------------------- |
27-
| policy_name | 要创建的掩码策略的名称。 |
28-
| arg_name_to_mask | 需要被掩码的原始数据参数的名称。 |
29-
| arg_type_to_mask | 需要被掩码的原始数据参数的数据类型。 |
30-
| expression_on_arg_name | 一个表达式,用于确定如何处理原始数据以生成掩码数据。 |
31-
| comment | 一个可选的注释,提供关于掩码策略的信息或备注。 |
26+
|------------------------ |------------------------------------------------------------------------------------------------------------------------------------ |
27+
| policy_name | 要创建的掩码策略的名称。 |
28+
| arg_name_to_mask | 需要被掩码的原始数据参数的名称。 |
29+
| arg_type_to_mask | 需要被掩码的原始数据参数的数据类型。 |
30+
| expression_on_arg_name | 一个表达式,用于确定如何处理原始数据以生成掩码数据。 |
31+
| comment | 一个可选的注释,提供关于掩码策略的信息或备注。 |
3232

3333
:::note
3434
确保 *arg_type_to_mask* 与应用掩码策略的列的数据类型匹配。
3535
:::
3636

3737
## 示例
3838

39-
此示例说明了基于用户角色选择性地显示或掩码敏感数据的掩码策略的设置过程
39+
此示例说明了如何设置掩码策略,以根据用户角色选择性地显示或掩码敏感数据
4040

4141
```sql
4242
-- 创建表并插入示例数据
@@ -52,15 +52,15 @@ INSERT INTO user_info (id, email) VALUES (2, '[email protected]');
5252
CREATE ROLE 'MANAGERS';
5353
GRANT ALL ON *.* TO ROLE 'MANAGERS';
5454

55-
-- 创建用户并将角色授予用户
55+
-- 创建用户并授予角色给用户
5656
CREATE USER manager_user IDENTIFIED BY 'databend';
5757
GRANT ROLE 'MANAGERS' TO 'manager_user';
5858

5959
-- 创建掩码策略
6060
CREATE MASKING POLICY email_mask
6161
AS
62-
(val string)
63-
RETURNS string ->
62+
(val nullable(string))
63+
RETURNS nullable(string) ->
6464
CASE
6565
WHEN current_role() IN ('MANAGERS') THEN
6666
val

0 commit comments

Comments
 (0)