Skip to main content Skip to complementary content

Masking Australian phone numbers

The Job in this scenario uses the tPatternMasking component to mask Australian phone numbers in the same format as the input values.

This scenario describes a Job which uses:
  • The tFixedFlowInput component to generate Australian phone numbers.
  • The tPatternMasking component to mask the input Australian phone numbers.
  • The tFileOutputDelimited component to output original and masked values.
In this Job, the fictitious Australian phone numbers use the XX XXXX XXXX format:
  • A two-digit area code.
  • A space used as a separator.
  • A first four-digit line number.
  • A space used as a separator.
  • A second four-digit line number.

To generate masked values in the same format as the input values, you need to define one masking operation for each part of the phone numbers. Separators will be left unchanged in the masked values.

Setting up the Job

Procedure

  1. Drop the following components from the Palette onto the design workspace: tFixedFlowInput, tPatternMasking and tFileOutputDelimited.
  2. Connect the three components together using Row > Main links.

Results

A Job using the tFixedFlowInput, tPatternMasking, and tFileOutputDelimited components.

Configuring the input component

Procedure

  1. Double-click tFixedFlowInput to open its Basic settings view in the Component tab.
    Configuration of the tFixedFlowInput component.
  2. Click the [...] button next to Edit schema and use the [+] button in the dialog box to add a column of String type.
    Schema of the tFixedFlowInput component.
  3. Click OK in the dialog box and accept to propagate the changes when prompted.
  4. In the Number of rows field, enter 1.
  5. In the Mode area, select the Use Inline Content(delimited file) option.
  6. In the Content table, enter the data you want to mask, for example:
    02 5550 8328
    08 5550 3018
    07 5550 5556

Configuring the masking operations

Configure one masking operation for each part of the input phone numbers. Separators will be left unchanged in the masked values.

About this task

In this Job, the fictitious Australian phone numbers use the XX XXXX XXXX format:
  • A two-digit area code
  • A space used as a separator
  • A first four-digit line number
  • A space used as a separator
  • A second four-digit line number

Procedure

  1. Double-click tPatternMasking to display its Basic settings view in the Component tab.
    Configuration of the tPatternMasking component.
  2. If required, click Sync columns to retrieve the schema defined in the input component.
  3. Click the Edit schema button to open the schema dialog box.

    tPatternMasking adds a read-only column to the output schema.

    Examples of the input and output schemas.

    The ORIGINAL_MARK column labels output records:

    • Original records are labeled with the true label.
    • Substitute records are labeled with the false label.
  4. In the Modifications table, click the [+] button to add three rows.
    Each row corresponds to a masking operation for a part of the input phone numbers.
  5. In the Modifications table, configure the first row:
    1. From the Column to mask field, select the column which holds the data to be masked.
      In this example, select PhoneNumber.
    2. From the Field type field, select Enumeration as the field type the data belongs to and enter "02,03,07,08" in the Values field.
      Two-digit area code will be masked with one of those values.
  6. In the Modifications table, configure the second row:
    1. From the Column to mask field, select the column which holds the data to be masked.
      In this example, select PhoneNumber.
    2. From the Field type field, select Interval as the field type the data belongs to and enter "2000,9999" in the Range field.
      Four-digit line numbers will be masked with one of those values.
  7. In the Modifications table, configure the third row:
    1. From the Column to mask field, select the column which holds the data to be masked.
      In this example, select PhoneNumber.
    2. From the Field type field, select Interval as the field type the data belongs to and enter "0000,9999" in the Range field.
      Four-digit line numbers will be masked with a value within the defined range.
  8. Click the Advanced settings tab and select the Output the original row? check box.
    The Job will output original and substitute records.
  9. From the Method list, select FF1 with AES to generate encrypted masked values.

    When you use a FF1 method, the number of possible values that the component can generate from the input pattern must be greater than or equal to 1,000,000.

  10. In the Password or 256-bit key for FF1 methods, enter a password to generate unique masked values.
    This password is also necessary to unmask data.

Configuring the output component and executing the Job

Procedure

  1. Double-click the tFileOutputDelimited component to display the Basic settings view and define the component properties.
  2. In the File Name field, set the path to the file that will contain the encrypted masked values.
  3. Press F6 to save and execute the Job.

Results

PhoneNumber;ORIGINAL_MARK
02 5550 8328;true
03 9757 4150;false
08 5550 3018;true
08 6557 6048;false
07 5550 5556;true
03 4168 8957;false

Original records are labeled as true. Substitute records are labeled as false.

The component generated masked output values in the same format - XX XXXX XXXX - as the input values:
  • Two-digit area code was masked with one of the defined values: "02,03,07,08"
  • The first four-digit line numbers were masked with one of the defined values: "2000,9999"
  • The second four-digit line numbers were masked with a value within the specified range: "0000,9999"
  • The input values use space characters as separators. Those characters are left unchanged in the masked values.

A format-encryption method and a password were used to bijectively mask data. Each phone number is masked with a unique value.

What to do next

To unmask those numbers, follow the procedure Unmasking Australian phone numbers.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!