ALTER MASK RULE
语法用于修改数据脱敏规则。
AlterMaskRule ::=
'ALTER' 'MASK' 'RULE' maskRuleDefinition (',' maskRuleDefinition)*
maskRuleDefinition ::=
ruleName '(' 'COLUMNS' '(' columnDefinition (',' columnDefinition)* ')' ')'
columnDefinition ::=
'(' 'NAME' '=' columnName ',' maskAlgorithmDefinition ')'
maskAlgorithmDefinition ::=
'TYPE' '(' 'NAME' '=' algorithmType (',' propertiesDefinition)? ')'
propertiesDefinition ::=
'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
ruleName ::=
identifier
columnName ::=
identifier
algorithmType ::=
literal
key ::=
string
value ::=
literal
algorithmType
指定数据脱敏算法类型,请参考 数据脱敏算法。ALTER MASK RULE t_mask (
COLUMNS(
(NAME=phone_number,TYPE(NAME='MASK_FROM_X_TO_Y', PROPERTIES("from-x"=1, "to-y"=2, "replace-char"="*"))),
(NAME=address,TYPE(NAME='MD5'))
));
ALTER
、MASK
、RULE
、COLUMNS
、NAME
、TYPE