Data Generation Rule Assignments
You can assign a global or an ad hoc generation rule to a column within a project.
To assign a rule, choose a rule from the list in the Generation Rule column or select New Generation Rule. If you do not select a rule, the column receives the default rule that you configure in default settings.
The following image shows the Define | Data Generation view in a project:
The following table describes the fields in the Data Generation view:
Column | Description |
---|
Table | Name of the table. |
Column | Name of the column of the generated data. |
Data Type | Data type of the column of the generated data. |
Is Null | Indicates whether the column can contain null values. |
Generation Rule | The generation rule that you want to apply to the column. When you click inside the column, you can choose which rule to apply to the column. The rules change based on the data type of the column. Select New Generation Rule to create an ad hoc generation rule for the column. |
Override | Shows the override property status for a rule. If the property is Yes, you can override the rule properties when you assign the rule to a column. When you override the rule parameters for a column the Override column value is Yes-Overridden. |
Available Data Generation Rules
The Data Generation view lists the rules that you can assign to each column of the target table.
If no global rules appear for a column when you click Generation Rule, make sure that the project contains global generation rules for the column datatype.
Ad hoc generation rules are available for columns of all datatypes. Click New Generation Rule to create an ad hoc generation rule.
Note: In the Data Generation view, you must click the Save icon each time you assign a rule. If you do not save the rule assignment before you assign the next rule, the Test Data Manager discards the rule assignment.
Assigning Standard Generation Rules to Columns
Assign standard generation rules to one or more target columns to generate data in the columns.
1. In a project, click Define > Data Generation to access the Data Generation view.
2. Select a column to assign a generation rule to.
3. Click inside the Generation Rule column to view the list of rules available for the data type of the column.
4. Select a rule.
5. Click Save for each column that you update.
If there are plans that contain the generation rule assignment, the Impacted Objects dialog box appears with the list of affected columns, plans, and data domains.
6. To download the list of affected objects, click Export, and save the .csv file.
7. To save the updates, click Continue.
To update the changes in a plan, you must generate and run the plan again.
Assigning Custom Generation Rules to Columns
Assign custom generation rules to one or more target columns to generate data in the columns.
1. In the Define | Data Generation view, click the Generation Rule column for the column that requires a mapplet rule.
2. Select the mapplet rule from the list.
The Custom Rule Assignment dialog box appears with the list of columns in the table.
3. Select a source input column in the left panel and a rule input port in the right panel.
Note: When you select a source input column, the rule ports with same datatype become available for mapping.
4. Click the Link icon to create a mapping.
An arrow appears that links the source port to the rule port.
Note: To create a mapping, you can also click Show Simple and map the ports.
5. If you need to remove the link, select the source input port and the rule input port. Click the Unlink icon.
The arrow between the ports disappears.
6. After you map the rule input ports, click Next.
7. Select a rule output port in the left panel and a source input column in the right panel.
8. Click the Link icon to create a mapping. To remove a mapping, click the Unlink icon.
9. Click Save.
Assigning Auto Rules to Columns
You can assign an auto rule to target columns if the Inferred Rule status is Yes. You can edit the inferred rule properties after you assign auto rule to the target.
1. In a project, click Define > Data Generation.
2. Select a table column on which you want to assign the rule.
3. Click inside the Generation Rule column and select Auto Rule.
4. To save the assignment, click Save.
5. To view the assigned inferred rule properties, select the column. To update the rule properties, click Edit.
6. To assign Auto Rule to multiple columns, select multiple rows and click Generation Rule Assignment.
The Apply Generation Rules dialog box appears.
7. Select Auto Rule, and click Apply to save the assignment.
Note: You must not apply an auto rule to a primary key column because a primary key column cannot contain null values.
Deleting Generation Rule Assignments
You can delete a generation rule assignment to a column.
1. In a project, click Define > Data Generation.
2. Select the column that you want to delete the rule assignment for.
3. Click Actions > Clear Assignment.
If the rule assignment does not exist in a plan, TDM deletes the generation rule assignment. If there are plans that contain the generation rule assignment, the Impacted Objects dialog box appears with the list of affected columns, plans, and data domains.
4. To delete the generation rule assignment, click Continue. To download the list of affected objects, click Export, and save the .csv file.
To update the changes in a plan, you must generate and run the plan again.