Mask Execution Order
DataVeil considers all dependencies within a masking Project and automatically determines the correct execution order of all masks.
Masking One Column with Multiple Conditional Masks
It is common to define a single mask for a Column; however, you can also specify multiple masks for a Column as shown in the example below.
Each mask is performed in sequence. If a row satisfies a mask's Where condition then it is masked and removed from selection by other masks.
What this example shows is that the first mask will perform the Randomize mask on Column 'Comment' for all rows where the UserLevel is less than 10.
The next mask will perform the Redact mask on all rows where the UserLevel is less than 100. However, the previous mask had already selected all rows whose UserLevel was less than 10 so this mask will effectively mask only those rows whose UserLevel is at least 10 and less than 100.
The third mask defines that the Column 'Comment' will be preserved on all rows where UserLevel is NULL.
Finally, the last mask defines that all remaining unmasked rows in Column 'Comment' are to be shuffled.
An unconditional mask is one that does not define the Where Option.
It is recommended that you always include an unconditional mask as either the only mask for a Column or as the last mask for a Column.
This will therefore guarantee that all rows will be masked. If you do not specify an unconditional mask and some rows are not masked then DataVeil shall report a Run-time warning.
Note: It makes no sense to have any masks defined after an unconditional mask because an unconditional mask will leave no unmasked rows for the following masks to select (see example above.)
If you intentionally want to mask only some rows and preserve the remaining rows then you can specify the Preserve mask as the final and unconditional mask. This tells DataVeil that the unmasked rows are intentional and therefore DataVeil shall not report a warning if there are any unmasked rows for that Column.
For example, if you want to Randomize the Column 'cola20' only on rows where Status = 'Secure' and you are certain that you want to preserve the Column 'cola20' on all other rows and therefore do not want DataVeil to report a Run-time "unmasked rows" warning then you could define the mask sequence as shown below: