Example 2

In this example a table is segmented based on values of a masked column. Some columns are masked. Primary key is not masked. This example can reflect a scenario where you have a lot of null values and you want to mask only non-null values.

Table of contents
Example table

Example table

Table Sales

TransactionId (PK) CashierId Date CustomerCardId DiscountAmnt
6545 12 2018-04-11 null 0
784 223 2019-08-29 92364346 20

Only CashierId, CustomerCardId and DiscountAmnt will be masked.
The table will be segmented, only records where CustomerCardId is not null will be taken.


  1. Import your table from the BizDataX Portal

    • Use the following settings:
      • Read-only symbol Read-only for the primary key
      • Read-write symbol Read-write for the column used for segmenting (eg. CustomerCardId)
      • Read-write symbol Read-write for columns that will be masked
      • Skip symbol Skip for columns that will not be masked
  2. Generate models and add activities

  3. Update the handler settings based on the database used. See supported data sets for more details.

    • Alert symbol Use the settings from the Segmenting section

    • For Range conditions use a variation of the following:

        $"{p}CustomerCardId IS NOT NULL"

      Here we are writing a part of a query which goes into the WHERE condition. {p} is an auto-generated schema and table identifier, after it without spaces write the column name.

      In this example we want non-null data based on the CustomerCard column (the non-primary key column) we are using for segmenting. We are specifying that we want the non-null data with IS NOT NULL.

  4. Set up your masking activities inside the Masking block activity.

  5. Compile, run, wait for the process to finish and verify that everything is masked.