Managing data definitions in a schema
You can manage and organize data definitions within a schema to support consistent and accurate test data generation.
Before you begin
- Ensured that you are assigned a role as a Project Owner or Tester in the project. See Managing access to the server projects.
- Ensured that your project contains a schema.
About this task
Procedure
-
Log in to Test Hub.
The Projects page of the initial team space is displayed.
-
Click to open the project that contains the test assets.
The Overview page of the project is displayed.
-
Click .
The Data page and the data navigator panel are displayed.
-
Select the schema that you want to edit in the data navigator panel.
The selected schema opens in the Data page.
-
You can perform the actions that are listed in the following table to modify
data definitions in a Schema View:
Task Action Create an inline data definition Perform the following steps:
- Click Add Data Definition.
- Type a name in the Name field under the Create Inline Data Definition section.
- Click Add.
A table with an empty field is displayed in the schema view.
Import existing data definitions Perform the following steps:
- Click the Add Data Definition.
- Select the data defintions from the Available Data Definitions section.
- Click Add.
Note: You can use the Search field in the Add Data Definition dialog to find the required data definition.Add a relationship between fields Perform the following steps:
- Hover over the field line until the Drag to connect to a field tooltip appears.
- Drag to the destination field in another data definition
Note: The data type of the source field and the destination field must be the same.Define the relationship ratio Perform the following steps:
- Click the Destination field.
- Enter the distribution ratio (For example: One-to-One or One-to-Many) in the Relationship configuration dialog.
Convert between Referenced and Inline DDFs Perform the following steps:
- Click the Actions-menu icon
on the data
definition.- Select Convert to Referenced, if the data definition is inline
- Select Convert to Inline, if the data definition is referenced.
Rename inline data definition Perform the following steps:
- Click the Actions-menu icon
on the data
definition. - Select Rename.
- Type a new name in the Rename Data Definition dialog.
- Click Rename.
Add new fields Perform the following steps:
- Click the Add field icon
. - Type a field name in the Name column.
Add generators in fields Drag a generator from the Catalog panel into a field under the Generator column. Note: You can use the Search Catalog field in the Catalog panel to find the required generator.Replace generators in fields Drag a generator from the Catalog panel into an existing generator field under the Generator column. The existing generator in the field is automatically replaced by the generator.
Modify generator configurations Perform the following steps:
- Click a generator in the Generator column.
- Update the configuration settings in the panel.
Note: If you modify the configurations of a basic generator, the changes are applicable only when the generator is used as a field in a data definition. The basic generator that is available in the catalog is not modified or saved.View sample data for a generator in Schema View Perform the following steps:
- Click the generator label next to a field in the
table in Schema View.
The properties of the generator is displayed.
- Click the View sample data.
A list of five sample records is displayed, fetched from the source database.
- Optional: Click the Reload Sample Data
icon
to refresh the data from
the source.
Include additional configuration details Perform the following steps:
- Click the Add new configuration tab.
- Type a name and set other settings as an additional configuration to the generator.
Reorder fields Drag and drop rows in the table to rearrange the fields. Delete fields Click the Delete icon in the field row to remove the field.
Remove one or more data definitions from Schema View Perform the following steps:
- Click the Actions-menu icon
on the data
definition. - Select Remove from schema.
The data definition is removed from the schema.
Alternatively, select the data definition and click Remove (1).
- Select the data definitions or that you want to remove and click Remove (#). The number in parentheses indicates the number of data definitions that are currently selected. For example, Remove (2) or Remove (5).
To remove all the data definitions from the Schema View, perform the following steps:
- Select the data definitions in the Schema View by pressing Ctrl+A to select all, or by pressing Ctrl and clicking on each DDF that you want to select.
- Click Remove All to remove
all the data definition from the schema.
The Remove All Data Definitions dialog box is displayed.
- Click Yes to confirm.Note: You cannot undo this action after the data definitions are removed.
Update data definitions in Schema View Perform the following steps:- Click the Update icon
to update the default row counts and
default distribution ratios for the data
definitions within the schema. The Update Schema dialog box is displayed, with the Default row counts and Default distribution ratios selected.
-
Click Update.
Auto-assign generators to data definitions in Schema View Perform the following steps:- Click the Update icon
. -
Select the Assign generators to fields checkbox.
The AI Provider option is displayed.
- Select the configured AI Provider from the drop-down list.
- Optional: Select the Overwrite existing generators checkbox to overwrite the existing generators.
- Click Update.
-
You can perform the actions that are listed in the following table to modify
data definitions in a Database View:
Task Action Export a data definition to a schema Perform the following steps:
- Click the Actions-menu icon
on the data
definition. - Select Add table to schema.
Note: The exported data definition changes to green color.Select the linked data definitions Perform the following steps:
- Click the Actions-menu icon
on the data
definition. - Select Select linked tables.
Note: The linked data definitions are changed to blue color.Add missing columns Perform the following steps:
- Select the data definition exported to schema.
- Click the Actions-menu icon
on the data
definition. - Select Add missing columns to schema.
Remove unnecessary fields Perform the following steps:
- Select the data definition exported to schema.
- Click the Actions-menu icon
on the data
definition. - Select Remove unnecessary fields.
- Click the Actions-menu icon
-
Click the Save icon
to save the changes made to the schema.