Tutorial 3: Generate Data Using a Pattern to Replace Data in Selected Fields


After completing this tutorial, users will be able to generate data, using a pattern, as a replacement for data in a field in a conversion specification, extract specification, or load specification.

In this tutorial, the au_id field in the author’s table will be changed from the current social security number format (###-##-####) to another format.

  1. Start ConverterPro, Related Extract, or Related Loader and open the saved specification.
    • For ConverterPro, open Tutorial1
    • For Related Extract, open Tutorial2_Extract
    • For Related Loader, open Tutorial3_Load
  2. Click Data Privacy. The Welcome to the Data Privacy Manager window appears.

    Warning

    Important

    A message box appears stating that changes cannot be made to the originating program (ConverterPro, Related Extract, or Related Loader) while the Data Privacy Manager is open.

  3. Select the type of disguise to be performed.

    • In ConverterPro, users can choose to do any of the following:

      • Use dynamic privacy rules.
      • Apply data privacy to source records.
      • Apply data  privacy  to  target  records. 

      Click Target Records: Specify Field Privacy.

    • In Related Extract, users can choose to do any of the following:

      • Use dynamic privacy rules.
      • Encrypt one or more data files that were created during the Related Extract process.
      • Disguise one or more fields within a selected table. 

      Click Specify Field Privacy.

    • In Related Loader, users can choose to do any of the following:

      • Specify extract data file decryption.
      • Disguise one or more fields within a selected table. 

      Click Specify Field Privacy.

    The Table Selection for Field Disguise window appears.

  4. Select the desired table, in this case authors, and click Next. The Field and Disguise Type Selection window appears.
  5. Under Record Layout, click au_id.
  6. In the Disguise Type list, select Data Generation - Pattern, enter a description, and click Next. The Data Generation Pattern Selection window appears.

    The pattern block is initially blank. This tutorial will change the format of the selected field from its original format of a social security number (for example, 255- 25-2555 to start with a letter, then two numbers, then another letter, four numbers and another letter and an ending letter Z (for example, A-55-B5555CZ).

    Even though this is a variable size field, since we have added an extra digit, the maximum length must be increased to accommodate the longer target field. This will be done when focus is returned to the ConverterPro window.

    To create the pattern and designate a letter, type a capital “A” for uppercase letters and a lowercase “a” for lowercase letters. To create numbers in the pattern, type an uppercase letter “N” or the pound “#” sign.

    To enter constants, such as hyphens in particular places in all fields, use brackets “[ ]” around the constant. More than one constant can  be  used within the brackets, such  as a specific area code {248].

  7. In the Pattern box, type:

    A[-]##[-]A####A[Z]

  8. Check the Unique Values box. This ensures that no two fields will  contain the  same data.
  9. Leave the Percentage Null field at zero. This specifies that all au_id fields will contain data.
  10. Click Validate. This verifies that a valid pattern has been entered. If, for instance, a lowercase “n” was entered to designate a number, an invalid pattern message appears. If the pattern is valid, the Sample Data button is enabled.
  11. Click Sample Data. The Browse Sample Data window appears.
  12. Check that the sample data is presented in the desired format and close the window.
  13. Click Next. The Field Selection window appears with the au_id field selected. A field mask could be used to retain any of the data from the  original fields. In this case, since the format of the data was changed, a field mask does not need to be used.
  14. Click Next. The Data Privacy Summary window appears. Review the data. To make any changes, click Back until focus returns to the window that needs change.
  15. Click Finish. The Welcome to the Data Privacy Manager window appears.
  16. From the File menu, select Apply & Exit. The calling program, in this case ConverterPro, appears.
  17. In the tree view, under Data Targets, right-click authors and select View\Edit Record Layout. The Record Layout Editor appears so the field length can be changed to accommodate the longer number.
  18. Select the first field, au_id(Key# 1). The Properties pane shows that the MaxSize field is 11.
  19. Double-click the number 11, change the MaxSize to 12, and click OK. The ConverterPro window appears. If the MaxSize is not changed, the letter Z will be truncated and not appear in the target data.
  20. From the File menu, select Save As. The Save Conversion As dialog box appears.
  21. In the Name field, type Tutorial3_DP, then click OK.
  22. Run the conversion specification and, when finished, click image2021-8-30_12-59-50.png to open the Target Data Browser for viewing.

Tutorial 3 is now complete.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Compuware Topaz Enterprise Data 20.13