Example 1

In this example a table is segmented based on values of a non-masked column. Some columns are masked. Primary key is not masked. This example can reflect a scenario where you need to segment non-primary key values in a range of data that was generated within a year.

Table of contents
Example table
Steps

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 from 2019 (2019-01-01 to 2019-12-31) will be taken.

Steps

  1. Import your table from the BizDataX Portal

    • Use the following settings:
      • Read-only symbol Read-only for the primary key
      • Read-only symbol Read-only for the column used for segmenting (eg. Date)
      • 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 something like:

         $"{p}Date >= '2019/01/01' AND {p}Date <= '2019/12/31'"
      

      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 data from a range of one year, so we have a condition for the Date column (the non-masked, non-primary key column) we are using for segmenting. The range is from January 1st to December 31st.

  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.