The Preserve Mask


This original values selected by this mask shall be preserved.

The selection is defined in the 'Where' condition tab.




When masking a database, the goal is to mask all sensitive columns. Sometimes, however, there are some rows within a sensitive column which are not actually sensitive and it is desirable or essential to preserve the original value.

For example, if you were masking column 'qty' and you wanted to preserve all values in this column where the value in the 'wprice' column was greater than or equal to 1000, then the Preserve mask would look like this:


Preserving NULL values

If you would like to preserve NULL values in a masked column then you could use a Preserve mask; however, you may find it more convenient to use the Preserve Nulls column setting in the Masking view.


Avoid spurious "unmasked rows" warnings

Another reason to use the Preserve mask is that DataVeil will always warn you if any rows in a sensitive column has not been processed by any mask.

For example, suppose that we had only a single Shuffle mask for a column called 'activityID' that specified a Where condition of 'carrierType < 10'. Therefore all rows in the 'activityID' column where the 'carrierType' column is less than 10 would remain unmasked. DataVeil would detect that those rows have not been masked and a runtime warning would be logged to say that this column has unmasked rows. If you are absolutely certain that those unmasked rows are not sensitive and you wish to preserve them, then you could just add a simple unconditional Preserve mask as the last mask in the column's masking sequence to indicate to DataVeil that all remaining unmasked rows are intentionally preserved. This will avoid the unnecessary warning. Please refer to Masking Execution Order for further information.