BMC AMI Test Drive
MC Compuware Test Data Privacy – Composite Rules
This tutorial will introduce you to Composite Rule processing to handle multiple data elements within the same column or field.
Revised: 2024/09/20 00:00
Getting Started
Instructions:
- This guide contains many screenshots to provide a visual reference
- Please note each place that you must enter your own specific ID or number
- You must complete each step before proceeding to the next to successfully follow the test drive script
If, at any point during your experience, your host connection times out, you may need to log back in to the TestDrive host connection.

If at any time during the execution of this script the Common Enterprise Services Login popup is shown, enter your test drive ID and password under User ID and Password, check the Save credentials box and then depress the ENTER key or click OK.
BMC AMI DevX Data Studio Data
Data privacy rules are created in the DevX Data Studio plug-in and stored in a repository. These rules are then available to disguise data from each of the following products:
- File-AID/EX
- File-AID/Data Solutions
- File-AID for DB2
- File-AID/RDX
- File-AID for IMS
The data to be disguised may reside in z/OS files, IMS databases, or relational database tables in DB2, DB2 UDB, Microsoft SQL Server, Sybase, or Oracle.
In this exercise you will:
- Create a Composite Rule to handle First and Last Names combined into one field or column
- Translation rules for first and last names were created in the previous exercise
- Uses the provided translate table
- Execute a single table Extract from SQL Server to view how Composite rule will be applied
- Execute a Load to load the newly disguised data to a new table
- View the disguised data in a File-AID Data Editor session
Open Your Own TDP Project
Do This
- From the menu, select BMC, DevX Data Studio, and select the Rules Repository tab.
- Right-click on the TDPRepos repository and Open Repository.
If you have closed your Test Drive session you may no longer have the Project created in the previous exercise. In that case, you may wish to recreate that project using the Disguise Rules Script, or you can use the TEST DRIVE DISGUISE PROJECT to see the completed results for this exercise. You may select this Project for execution in the Extract process.
Do This
- Double-click on your Data Privacy Project.
Do This
- Click on the Data Elements tab at the bottom.
Notice you have already created DE's for FIRST LAST NAMES, FIRST NAME, and LAST NAME. First and Last Names have translation rules created for each to give a replacement value. The Composite will allow the replacement values to be used correctly within the First Last Names field or column.
Composite Creation
Do This
- In your Project, Click on the Composites tab at the bottom of the screen.
Do This
- Click on bottom right Global button under Categories.
- Import Name and Separators categories from Global by clicking Import.
Categories
Do This
- In the Data Items section in the top right, click on the Global button under Data Items.
- Select Name-First Name, Name-Last Name and Name-Middle Name.
Do This
- Scroll down and also select White Space Separator (reducible).
- Click Import.
Do This
- Under Composite on the left-hand side click the Add button.
Do This
- Give your Composite a name as shown.
- Under Data Item on the left grab Global: Name-First Name and drag to the black box under Structure.
- Line it up on the left of that box until you see the arrows and drop it.
Make sure that all the components are directly touching one another in the Structure box. If you get a pop-up window asking for positions you have dropped it in the wrong place. In that case click Cancel and retry.
Do This
- Drag the White Space Separator to the right of the first name in the Structure box and drop it directly beside the First Name.
Do This
- Continue lining up Middle Name, then a Space, then Last Name.
Do This
The data in our column or field may or may not contain a Middle Name.
To handle this:
- Click on the Middle Name in the Structure box.
- Click the Optional box below under the General tab.
Logically, if the Middle Name may or may not exist, then the second Space may or may not exist.
Do This
- Click on the Second Space in the Structure box and select Optional below.
- Click on Test. at the bottom of the screen
Do This
- Type a name into the field to test your newly created Composite definition.
- Click OK to view your results.
You will now see how it breaks the combined field into individual elements.
Since we have already created a rule for First Name, that rule can be applied to that portion of the field or column. And the rule for Last Name can be applied to that portion of the field.
We do not have a rule for Middle Name. In this scenario we will leave the existing data.
Do This
- Click the X to close this box. Click OK to save your Composite Definition.
Composite Rule
We will now use the Composite definition just created within a Rule.
Do This
- Click on the Rules tab at the bottom of the screen.
- Click Add to add a new Rule.
Do This
- Type a new Rule name as shown and click Composite for the Create Rule Action.
- Click Next.
Do This
- Type in an Action name as shown in the first field.
- Use the drop-down menu for Project Resource and select the Data Element already created for FIRST LAST NAMES.
- Click Next.
Do This
- Select your Composite field definition from the drop-down menu.
The different data items will appear below.
- Click on a Data Item and use the drop-down under the Data Element column to match to the correct Data Element.
Since we are not disguising Middle Name or Spaces we will leave those blank.
Do This
- Click the X in the tab to Close the updated Data Privacy project.
You have now successfully created disguise rules to replace sensitive data in fields or columns containing Names, Phone Numbers, Social Security Numbers, Credit Card Numbers, Dates, and Email addresses.
These rules exist in your project in the repository and can be used against multiple data types. In the next step these rules will be called to disguise sensitive data as we move the data (example taking production data to another environment).
Do This
- Select the Data Explorer tab next to the Rules tab. These are both available within the DevX Data Studio perspective..
Do This
- Right click on the FAEXRepos Repository in the left-hand tree view.
- Select Open.
Do This
- Right click on Related Extract and select New.
Do This
- Input an Extract name as shown and then click Browse for the Driving Object.
Do This
- Select Database (JDBC) for the Type.
- Use the Host dropdown to select the SQL Server Sample database.
- Type dbo (in lowercase) for the Schema Name.
- You may be prompted for credentials to connect to the database. Enter "testdrive" for the userid and password and click OK.
- Click List beside schema name.
Do This
- Select the CONTACT_TABLE from the list and click OK.
Do This
- Click Browse for the Extract file location. This is where the extract file will be written.
Do This
- Navigate to Temporary Files and then click on Select Folder.
The extract will be saved in this directory under a folder name the same as your job name, such as CONTACT_TABLE_EXTRACT.
Do This
- From the Extract Overview screen, select the Data Privacy tab along the bottom of this section.
Do This
Here you can select the Disguise Rules already created and saved within your Data Privacy Project. This will determine the data eligible for disguise and the rules to be applied to the data during this extract process.
- Click on the Browse button for Project Name.
Do This
- Use the Repository drop-down to select the TDPRepos repository.
- Select your project, or you may use the TEST DRIVE DISGUISE PROJECT for this exercise.
- Click OK.
Do This
- Execute by clicking on the Blue Arrow execution button in the top right corner.
Do This
- Look in the Console tab for execution information.
- Double click the Console tab to maximize this view.
- Here you will see number of rows extracted.
- Scroll down to see information on how the data privacy rules were applied to the different columns.
Do This
- Double click again on the Console tab to minimize.
- Close the Extract job by clicking on the X in the tab.
Do This
- Save the Extract job when prompted.
Load Disguised Data to a New Table
Next you will load the disguised data to a table.
Do This
- Navigate to the Data Explorer view and right click on Related Loader and select New.
Do This
- Name this Load job CONTACT_TABLE_LOAD.
- Click on the Browse button to navigate to the target table to load the data.
Do This
- Take the default Type Database and Host of SQL Server Sample and click OK.
Do This
- Click Finish to open the Related Loader.
Do This
- Under Extracted Data navigate to the recently run extract.
- Click Browse.
Do This
- Select the CONTACT_TABLE_EXTRACT job from the list.
- Click OK.
Do This
- From the Overview click on the Objects tab across the bottom of this section.
Here is listed the Source and Target table names. The Source is derived from information in the Extract file, and the target defaults to this same name.
- Right click on Target Name and select Change Target Object Name.
Do This
- Change the target table name to CONTACT_TABLE_DIS.
This table does not exist and will be created during the Load job.
Do This
- Click on the Field Mappings tab along the bottom of this section.
If the source and target tables are different column mapping can be done here.
Do This
- Click on the DDL tab along the bottom of this section.
Here you will see the DDL needed to create the target table. The DDL is generated from the source table information.
Changes can be made on these screens. For example, if the Contact table has a Constraint with the CONT_IDX index. To avoid a conflict during the load the index name will need to be changed.

Do This
- Click on the Options tab along the bottom of this section.
Listed are options including for Commits and Discards.
- Click the Blue execute button in the top right.
Do This
- Look in the Console tab for execution information.
- Double click the Console tab to maximize this view.
Here you will see number of rows loaded.
Do This
- Double click the Console tab to minimize this view.
- Close the Load job by clicking the X in the tab.
- Click Save to save this job in the repository.
BMC AMI DevX Data Studio Data Editor
In this exercise you have extracted data and applied disguise to the sensitive elements and loaded that data to a new table. Now open both the original data and the newly created disguised table and visually compare the two.
Do This
- Select the Host Explorer tab.
Do This
- Right click on Hosts
- Select Configure
- Click Host Types and check SQLServer Databases.
- Click Apply and Close.
Do This
- Expand Hosts
- Expand SQL Server Sample by clicking on the arrow.
- Expand Microsoft SQL Server.
(If it cannot be expanded, right click on Microsoft SQL Server and select Add Filter. Type "dbo" in lowercase for the Schema and * in the table field.)

Do This
- Double click on the CONTACT_TABLE.

Do This
- Click Run to open the table in an Edit session
Do This
- Double click on CONTACT_TABLE_DIS.
Do This
- Click Run to open this table in another tab within the Edit session.
Do This
- Place your cursor on the second tab and drag to the right and drop to see the two tables side by side.
Notice the gray line that pops up during the drag.
Do This
You can now see the Contact Name column in both tables and see how the Composite rule replaced the original First and Last Names with new values. Note Row 9 had a Middle Name in the original data and that is retained in the new table.
Do This
- Scroll to the right for each table to view the Telephone Number columns.
Remember for the Phone Rule the first 3 bytes of data are masked and no disguise is applied. In this example, only the last four digits are changed.
Do This
- Close both tables by clicking on the X within the tabs.
- Close all open tabs.
This completes this exercise.
You have now successfully created and applied disguise rules to data from a single SQL Server table and loaded newly disguised data to a new table. Continue on to Part 3 Related Extract with Disguise to learn more about extracting data from multiple tables while keeping the database integrity.