Ad Hoc Generation Rules
An ad hoc generation rule is a data generation rule that you create within a project. You can create an ad hoc generation rule for a column in the target table.
An ad hoc rule does not have a name. You cannot move an ad hoc rule because you use target columns to define the rule.
An ad hoc generation rule includes the standard data generation techniques and the techniques such as reference lookup generation, effective dates generation, and expression generation. An ad hoc rule can have more than one target column, based on the generation technique that you select.
When you create an ad hoc rule, the generation techniques that you can select depend on the data type of the column. To create an ad hoc rule, you can use a standard or an ad hoc generation technique. The ad hoc generation techniques include expression generation, reference lookup generation, and effective dates generation.
For example, an Airport table contains airport codes. You create a reference lookup rule on a From_City column that generates data from the Airport table and inserts it into the From_City column in the target table.
In an ad hoc rule, if you want to generate numbers in a column that uses string data type, you can change the data type to numeric. For example, Employee_ID is a sequence of numbers and the target table contains the Employee_ID column with string data type. To generate numbers in the column, select Override Data Type to Numeric when you create an ad hoc generation rule.
Creating an Ad Hoc Generation Rule
You can create an ad hoc generation rule in a project. The generation techniques change based on the data type of the column that you selected. The generation parameters change based on the generation technique that you select.
1. In a project, click Define > Data Generation to access the Data Generation view.
2. Select a column to assign the ad hoc 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. Click New Generation Rule.
The New Generation Rule window appears.
5. If you want to generate numbers in a column with string data type, select Override Data Type To Numeric.
6. Select the generation technique from the list.
7. Enter the generation parameters. You can choose to generate unique output values.
Note: If a Java heap space exception occurs, contact the Administrator to increase the heap size.
8. Enter the exception test data options. Configure whether to allow null or empty spaces. Configure whether to generate data that is not valid.
Editing an Ad Hoc Generation Rule
You can edit an ad hoc rule assignment to a column.
1. In a project, click Define > Data Generation to access the Data Generation view.
2. Select a column to edit the ad hoc rule assignment.
3. Click Actions > Edit Generation Rule.
The Edit Generation Rule window appears.
4. Edit the parameters that you want to change. Click OK.
If there are plans that contain the generation rule assignment, the Impacted Objects dialog box appears with the list of affected plans.
5. To download the list of affected plans, click Export and save the .csv file.
6. To save the changes, click Continue.
To update the changes in a plan, generate and run the plan again.