Sample Session

In this session, you:

Creating Simple Subsetting Classes

You can create new classes to be used for subsetting purposes, or you can use a predefined class. In this exercise you will create subsetting classes named DEPTNAM and DEPTNO.

  1. In Data Builder, open the Work with Classes window (click or access it through Environment > Work with Classes).
  2. Click New.
  3. In the Name field, specify DEPTNAM as the name of the class you want to create.
  4. In the Full description field, specify DEPARTMENT NAME as the description of the class.
    Note: The description will be visible as a label when you assign the class to data elements within files.
  5. Select the Super Class None.
  6. Select the data type Alpha.
  7. Leave the remainder of the fields at their default values.
  8. Click Apply. The class DEPTNAM appears at the end of List of Classes.
  9. Click New.
  10. In the Name field, specify DEPTNO as the name of the class you want to create.
  11. In the Full description field, specify DEPARTMENT NUMBER as the description of the class.
  12. Select the Super Class None.
  13. Select the data type Alpha.
  14. Click Apply. The class DEPTNAM appears at the end of List of Classes.
  15. Click OK to close the Work with Classes window.
  16. Continue to the next section.

Associating Simple Subsetting Classes to Data Elements

In this exercise you will be manually associating the classes DEPTNAM and DEPTNO you just created with columns in tables DEPT and EMPLOYEE:

  1. Open the Work with Data Elements window (click or access it through Environment > Work with Data Elements).
    Note: If a message appears indicating that the default confirmation options have not been set, click Yes to set them; click Apply, and then OK in the Options window. However, this should not occur if you followed the steps in the tutorial Using Data Express.

    You can also access the Work with Data Elements window from the main window by selecting the file name, right-clicking to view the context menu, and then by clicking Work with Data Elements of the Selected Data Store.

  2. Click the Apply Filter button to display all data stores:
    Note: To narrow down the list of data elements displayed, use the filter fields (Machine ID, Company name, and Application ID), and then click Apply Filter. To display all data elements, simply click Apply Filter.
  3. Click the Classes - Assignment tab.
  4. In the All Classes pane, expand the None Super Class, and then select the class DEPARTMENT NUMBER.
  5. Click the Data Store column to data elements by data store.
  6. In the List of Data Elements, select the row for DEPT.DEPT. (That is, select the row for the data storeDEPT and the name DEPT.)
    Note: By selecting data elements, you are specifying to mask at the data-element level. If you do not select any data element, you will be masking at the class level.
  7. Click the Assign Class button to assign the DEPTNO class to DEPT.DEPT.

    DEPARTMENT NUMBER now appears in the Assigned Class column for DEPT.DEPT.

  8. In the List of Data Elements, select the row for EMPLOYEE.DEPT. (That is, select the row for the data store EMPLOYEE and the name DEPT.)
  9. Click the Assign Class button to assign the DEPTNO class to EMPLOYEE.DEPT.

    DEPARTMENT NUMBER now appears in the Assigned Class column for EMPLOYEE.DEPT.

  10. In the All Classes pane under the None Super Class, select the class DEPARTMENT NAME.
  11. In the List of Data Elements, select the row for DEPT.DNAME. (That is, select the row for the data storeDEPT and the name DNAME.)
  12. Click the Assign Class button to assign the DEPTNAM class to DEPT.DNAME.

    DEPARTMENT NAME now appears in the Assigned Class column for DEPT.DNAME.

  13. Click the Close button to close the Work with Data Elements window.
  14. If you are planning to go straight on to the next tutorial Data Subset Extraction using Referential Integrity, you can keep Data Builder open. Otherwise, either click File > Exit or click the button, and then click Yes.
  15. Continue to the next section.

Starting the Data Subset Extraction Module

To start Data Subset Extraction:

  1. Click Start > All Programs > Micro Focus Data Express 4.0 > Data Subset Extraction.
    Note: If you are using Data Express on Windows Vista and User Access Control is enabled, you must run Data Subset Extraction as Administrator.
  2. Select the XDB Knowledge Base Dist KB for DX for 4.0 as the required database with which to launch the connection .
  3. Click OK.
  4. In the User Name field, specify install.
  5. In the Password field, specify 1.
    Note: This is a number one.
  6. Click OK.
  7. Select the schema DX40. The Data Subset Extraction window appears:
  8. The Data Subset Extraction window comprises two main areas: the node pane and the grid area. The node pane contains a hierarchical structure that shows the grouping associated with each root-level node. The two root-level nodes are Groups and Creators.
  9. Continue to the next section.

Creating a Group

The Work with Groups window lets you to define, view, modify, and delete groups.

Groups can be used to logically separate the methods created for each workspace. Each method must belong to a group.

To create a group:

  1. Open the Work with Groups window (click or access it through Environment > Work with Groups).
  2. Click New.
  3. In the Machine ID list, click ALLIE.
  4. In the Company list, click DXPROJ.
  5. In the Group name box, specify DX40GS.
  6. In the Group description box, type DX 40 GETTING STARTED GUIDE.
  7. Click Apply.
  8. Click OK.
  9. Continue to the next section.

Creating a Simple Method

The New Method Wizard is used to create a new method, which is the extraction proposal containing the set of operations needed for the creation of the test environment. During method creation, all the information concerning the method is saved locally in a directory indicated by the user

Reduction can be obtained for data stores of a certain size and/or a particular type. In this case, you must be knowledgeable about the application to determine the appropriate selections. However, Data Subset Extraction can recognize and automatically create a first subset containing a series of files (called register table files) that are initially brought into the new test environment. Identifying register table files has the following advantages:

  • You can create a method to extract only the register table file subset, which is normally valid for the creation of any test environment independently of the selection criteria applied. Once this method has been saved and confirmed, it can be run whenever necessary.

You can create a second file subset, which filters the register file subset you created, to produce a file subset that is reduced even further.

To create a simple method:

  1. Launch the New Method Wizard (click or access it through Environment > Create New Method).
  2. In the Machine ID list, click ALLIE.
  3. In the Company list, click DXPROJ.
  4. Note: Files belonging to different workspaces cannot be included.
  5. Click Next to go to the next screen. Note: If a group has not previously been defined in the Work with Groups area, it can be defined from this screen, by simply specifying its name and description in a specific field.
  6. In the Group name box, click DX40GS.
  7. Text in the Group description box populates automatically.
  8. In the Method box, type SIMPLE.
  9. In the Method description box, type: SIMPLE METHOD.
  10. Click Next to go to the next screen.
  11. Select Import all non-register table Data Stores to include demographic files are registered in a dedicated elaboration step of the method.
  12. Click to clear the Import all register table Data Stores box.
  13. Click Next to go the next screen:
  14. Select DEPARTMENT NAME to be used as the primary extraction criteria.
  15. Click Next. Data Subset Extraction automatically extracts all the environment files containing the selected classes, entering them into a specific step. Once the method has been created, the remaining files (that is the files that are not sensitive to the selected classes) will initially be excluded from elaboration. During the Method Confirmation phase, they can be included in the method again. These files will then be integrally copied into the new environment generated by the method involved.
  16. One or more classes related to each class selected as a primary extraction step can be indicated. The primary extraction criteria are listed in the Selection class field.
  17. Select the class DEPARTMENT NUM BER from the Other class list.
  18. Click Add to relate the class DEPARTMENT NUMBER to the class DEPARTMENT NAME. Data Subset Extraction automatically extracts all the environment files containing the related classes and inserts them in a further elaboration step.
  19. Click Finish. The Create Method window is displayed.
  20. Click Start.
  21. Click OK.
  22. Click Confirm. During method confirmation, specified filters are applied to the classes needed to perform the extraction, and the method information is imported from a temporary file to the Knowledge Base. This process, by default, will only include the data stores that contain these selected classes. If you would like to include your other data stores not related to the classes specified previously, check the option Move excluded data stores into new step. In this example, we will simply create a method based on the data stores that use classes DEPTNAM and DEPTNO.
  23. Click OK.
  24. In the Choose a Filter Type list, click FILTER BY VALUE LIST:
  25. In one of the boxes on the lower-left corner, type Sales.
  26. Click OK to close the Set Filter to Selection Classes window.
  27. Click OK to confirm the method.
  28. In the Work with Method window, click Properties.
  29. Click Active.
  30. Click OK to close the Method Properties window.
  31. Click OK to close the Work with Method window.
  32. Continue to the next section.

Exporting Simple Subsetting Method Information

Export simple subsetting method information.

  1. Open the Distributed Exporter window by clicking from the main window:
  2. Click Select Target.
    Note: If you have already completed the Masking tutorial, your target database will already be listed. If this is the case, you just need to select the row for the GSDEMO database from the Target Database List and then click OK; then proceed to step 7.
  3. Click Add.
  4. Enter the following details for the target (leave the remaining fields unchanged):
    Database GSDEMO
    Type ODBC
    User name install
    Password 1
  5. Click OK.
  6. Click OK.
  7. In the Distributed Exporter window, in the Target schema field, specify TGT.
  8. In the Output directory, specify the odbc\config subfolder of your data directory. For more information, see the section Data of chapter Extension Technology Directory of Part 3. Using Extension Technology.
  9. Click Export.
  10. When prompted to continue elaboration, click Yes.
  11. Click OK.
  12. Click Close to close the Distributed Exporter window.
  13. If you are planning to go straight on to the next tutorial Data Subset Extraction using Referential Integrity, you can keep Data Subset Extraction open. Otherwise, either Click File > Exit or click the button, and then click Yes.
  14. Continue to the next section.

Executing Simple Subsetting Method

By default, the Extension Technology will attempt to insert the processed data into the target database. For testing purposes, it is possible to configure the Extension to instead write the processed data into text files as comma separated values (.csv).

Execute a simple subsetting method with Extension Technology:

  1. From a MS-DOS prompt, change to the executables directory c:\Program Files\Micro Focus\Data Express 4.0\odbc.
  2. 2. Type dxestart

    The target ODBC data store now contains reduced tables.

  3. The execution finished without errors, so you are prompted to view the log file. Type Y to view the file.
  4. Close the text file.
  5. Continue to the next section.

Verifying Results

Verify that the tables are in fact different:

  1. 1. Launch the SQL Wizard: ..\mfsql\bin\xwiz40n
  2. Notice that the tables TGT.EMPLOYEE and TGT.DEPT have been reduced from SRC.EMPLOYEE and SRC.DEPT.