Show TOC

Assigning Test Data Profiles to ColumnsLocate this document in the navigation structure

You can associate a test data profile directly to a column or to a domain.

Context

Note To assign a test data profile to a domain (see Domains (CDM/LDM/PDM), open the domain property sheet and select the appropriate test data profile in the Profile list on the General tab. A test data profile assigned to a domain will generate test data for all the columns attached to the domain.

Procedure

  1. Open the property sheet of a column and click the Detail tab.
  2. Select the appropriate test data profile.
  3. [optional] Adjust the following properties in the Column fill parameters group box as appropriate:
    • Null values - [Default: 0%] Specifies the percentage of values to leave empty.
    • Distinct values - [Default: 100%] Specifies the percentage of values that must be unique. For example, if you set this field to 100 % for one column and to 80% for a second column, and then generate the table with 10 rows, all 10 rows in the first column will have different values, while 2 values in the second column will be repeated. This is a maximum value, and can change depending on the referential integrity parameters of primary key columns. Alternately, you can enter a specific value without a percentage sign, to indicate the exact number of column rows that should contain unique entries.
      Note If you use a test data profile with a list generation source to a column with a given percentage of distinct values, PowerDesigner uses the values from the test data profile list. If there are not enough values declared in the list, a warning message is displayed in the Output window to inform you that the distinct value parameter cannot be enforced due to lack of distinct values in the list of values.
    • Average Length - [read only] Used for estimating the size of the database (see Estimating Database Size). The default value is the maximum length for the data type defined for the column.
    Note These properties on the column property sheet General may override values entered in the Column fill parameters groupbox:
    • Mandatory (M) - Specifies that the column must contain a value and sets Null values to 0%.
    • Unique (U) - Specifies the column must contain a unique value and sets Null value to 0% and Distinct values to 100%.
    • Foreign (F) - The column is a foreign key column and takes the values of the corresponding primary key column in the parent table.
  4. Click OK to close the column property sheet and return to the model.
    Note To quickly assign test data profiles to multiple columns, use the List of Columns or the Columns tab of a table property sheet. If the Test Data Profile column is not visible in your list, use the Customize Columns and Filter tool to display it.
  5. [optional] Generate your test data (see Generating Test Data to a Database).