The ALTER MASK RULE
syntax is used to create a mask rule.
AlterEncryptRule ::=
'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
specifies the data masking algorithm type, please refer to Data Masking Algorithm.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