MASK
Overview
Applies Masking logic to a column. This operation can be useful to change the content
of a column containing sensitive data, such as email addresses or SSN numbers. If the masking
operation is used as part of a read pipeline before the CAPTURE
operation,
the change log will contain the masked data. If applied after the CAPTURE
operation, change log will contain the original unmasked data, allowing you to selectively
mask sensitive data by target.
Syntax
Applies a mask to a field using one of the masking methods: default, ssn, random, custom, credit_card, email.
MASK COLUMN '<field>' { AS < DEFAULT | SSN | EMAIL | CREDIT_CARD| RANDOM | CUSTOM > } { KEEP 'n,n' } { MIN <n> } { MAX <n> } { PAD '...' } ;
KEEP |
Number of leading characters to keep; used with the Custom and SSN mask type |
MIN |
Generate a numeric value greated than the one specified; used with the Random mask type |
MAX |
Generate a numeric value lower than the one specified; used with the Random mask type |
PAD |
Number of trailing characters to keep; used with the Custom and SSN mask type |
Example 1
-- Get data from an RSS Feed SELECT * FROM HTTP [Rss Feed] (GET /econi.xml) APPLY TX (//item); -- Mask the category column using the default behavior MASK COLUMN 'category'; -- Mask the title using a custom mask -- keep 0 leading chars, 10 trailing chars, and 5 ?s in the middle; MASK COLUMN 'title' AS CUSTOM KEEP '0,10' PAD '?????';