Oracle Cloud Infrastructure Documentation

Conditional Masking

Conditional masking lets you arrange masking formats according to different conditions. For example, consider masking a column containing unique person identifiers. Identifiers that belong to country USA can be masked using Social Security Number format and that belong to country UK can be masked using National Insurance Number format. You can do conditional masking in the Data Masking wizard.

Let's consider another example. Suppose that you have the following table, which consists of employee names, job categories, and salary information. You can use conditional masking to mask the salary data based on the following conditions:

  • If job category is Manager, replace salary with a random number from 100000 through 150000.
  • If job category is Worker, set salary to a fixed number (75000).
  • Default is to preserve the existing value.
Employee Job Category Salary Conditional Result
Alice Manager 90000 100200
Bill Manager 88000 132000
Carol Worker 72000 75000
Denise Worker 57000 75000
Eddie Worker 70000 75000
Frank Worker 45000 75000
George Assistant 45000 45000