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 the row is then removed from consideration by other masks.
In other words, a row is only masked once. This is done by the first mask whose Where condition is satisfied.
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.
If you have a need to use the same sequence of masks for more than one column, then consider using the Sequence Mask. It allows for easy re-use of the same sequence in many columns.
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: