0 / 0
Creating masking flows
Last updated: Dec 11, 2024
Creating masking flows

Masking flows define the data that is to be masked, whether it's a full copy of data tables or a subset of data tables with relationships intact. Masking flows are reusable definitions and can be saved as drafts, which is edited, and used to run jobs.

A masking flow job is created when you run a masking flow asset. You can create a job from the Assets page of a project by selecting the options menu on a masking flow asset and clicking New job to run that masking flow. Or you can click the masking flow asset name and click Configure job. The job will be in the Jobs tab. See Running masking flow jobs.

At a minimum, confirm that the following access, rules, and tasks are completed:

  • Access to at least one catalog.
  • The data admin applied data protection rules to data assets in the catalog.
  • Moved data assets to mask to an analytics project. These assets must come from the catalog.

Masking flows

Creating a masking flow includes adding the masking flow to a project, and then specifying the masking type to apply to the masking flow. The masking type determines the records and tables that you want to mask.

Masking types

Masking types help you determine the records and tables that you want to mask.

Bulk copy

Produces masked copies of tables without searching for relationships. Use Bulk copy when you want to quickly mask a few tables, add conditions, and relationships are not important. For example, Customers table, Policies table, and Sales table. See Using Bulk copy masking type.

Copy related records across tables

Masks a related subset of tables. Use this masking type when you want to mask only a specific related subset of data, for example, "Customers in California who own a red truck" and all related data. See Using Copy related records across tables masking type

Example for masking only customers in California who own a red truck and all related data

  1. Specify a driver table with the following optional conditions:

    • Customers table where state = California
    • Car = truck
    • Car_color = red

    The conditions are then scanned for primary key and foreign key relationships.

  2. The scan identifies the tables that are related to the driver table. For example, the Insurance Claims table is the child of the Customers table, so only the insurance claims for "customers in California who own a red truck" is added to the subset table. These tables are added to the masking flow.

Note:
  • You can also define conditions in Bulk copy. The difference is that Copy related records across tables scans the relationships and adds related tables.
  • You can filter rows in data protection rules on Bulk Copy (but not Copy related records across tables) masking flow type. If row filtering data protection rules affect any asset with the Copy related records across tables masking flow type, the job fails with the error message: QPE005: Policy denies access to the asset with row filter rule for Copy related records.

To create a masking flow:

  1. Click Add to project and choose Masking flow from the Available asset types.
  2. Enter a name for the Masking flow.
  3. Enter an optional description.
  4. Add an optional tag.
  5. Click Next.

Using the Bulk copy masking type

To use Bulk copy:

Tip:
  1. Add data from the project to the masking flow. If no data is found, exit out of the masking flow and add data assets from the catalog to the project.
  2. Navigate through connections and schemas to add tables to the masking flow.
  3. Define optional conditions.
    1. Click Define to add conditions specific to individual data assets.
    2. Scroll the list of columns and click + to add a column as a condition.
    3. Enter the value for the condition, such as State: California, and then Save. You can look at the data in this asset by clicking the asset name. Data might already be masked in this view based on your permissions.
  4. Masked columns:
    • Yes means that columns are masked by data protection rules.
    • No means that no columns in this data table has a relevant data protection rule applied.
  5. Sampling:
    1. Select the assets that you want to include in your sample, and then click Set sampling. You can also click Set sampling from the overflow menu.
    2. Specify the number of rows, starting from the first row, that you want to mask and include in a sample for a selected table. For example, if you want to include the first 1000 rows in a table for your sample, the sampling limit is 1000 and the first 1000 rows are only copied and masked.
  6. Save the masking flow as draft or configure a job.

Using the Copy related records across tables masking type

To use Copy related records across table:

  1. Add data from a project to the masking flow. If no data is found, exit out of the masking flow and add data assets from the catalog to the project.

  2. Navigate through connections and schemas to select the driver table, from the previous example, and add to the masking flow. You can select only the driver table here and related tables are added in subsequent steps. Relationship analysis begins.

    The driver table is added to the Assets list and you can optionally add conditions and configure sampling.

  3. To add related tables, click Add related tables.

  4. Choose whether you want to search for parent tables or child tables or both. For example,

    • CUSTOMERS table has the following columns:
      • customer_id (primary key)
      • customer_name
      • customer address
      • salesperson_id (foreign key).
    • SALES table has the following columns:
      • salesperson_id (primary key)
      • salesperson_name
      • amount_sales
    • TRANSACTIONS table has the following columns:
      • transaction_id (primary key)
      • product_sold
      • customer_id (foreign key)

    In this example, the CUSTOMERS table is the driver table. The SALES table is a parent table of the CUSTOMERS because a primary-key and foreign-key relationship on the salesperson_id column exists. The SALES table has the primary key and CUSTOMERS table has the foreign key.

    The TRANSACTIONS table is a child table of the CUSTOMERS table because a primary-key and foreign-key relationship on the customer_id column exists. The CUSTOMERS table has the primary key and the TRANSACTIONS table has the foreign-key.

  5. Add the parent tables or child tables or both.

  6. Save the masking flow as draft or configure a job.

Watch video icon Watch this video to see how to set advanced masking options and create a masking flow asset in a project.

This video provides a visual method to learn the concepts and tasks in this documentation.

Learn more

Parent topic: Masking data with Masking flow

Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more