Manage simulation templates
Simulation templates define the rules used by data generation tasks. Use templates to standardize how NineData generates field values, business categories, null ratios, and other test data patterns.
Prerequisites
Before you create or manage simulation templates, make sure these requirements are met:
- You have already created or joined an organization, and the organization has subscribed to DevOps Enterprise. Please ensure that your annual or monthly subscription is still active. For more information, please refer to Manage Organizations.
- Your current account has been switched to the target organization. For more information, please refer to Switching to an Organization.
Create simulation rules
NineData has a built-in default simulation template with dozens of predefined simulation rules corresponding to common database field types. If your scenario is not covered by these rules, you can create new simulation rules within the template.
Log in to the NineData Console.
- Click on DevOps > Data Generation in the left navigation bar.
Click the Emulation Template tab on the page, then click Details in the Actions column of the target template.
On the Template Detail page, click Create Emulation Rule.
tipYou can also click Duplicate in the Actions column of the target simulation rule to customize a new simulation rule based on the existing one.
Configure the simulation rule, then click OK.
Parameter Description Name Enter a name for the simulation rule. Rule Type Select the simulation rule category. NineData comes with 7 built-in rule categories. To create a new category, see Create Rule Category. Generating algorithm Select the generation algorithm. The algorithm controls how generated data matches the scenario requirements. After selecting an algorithm, select the corresponding parameters for that algorithm. Parameters vary by algorithm. Use the page display as the source of truth. Null Ratio(%) Specify the percentage of generated NULL values. For example, if this value is 50, the field has a 50% chance of being NULL.
Note: This option is available only when the target field allows NULL values.Detection Rules (Optional) Define how NineData automatically recognizes matching columns. This rule is written as a Java conditional expression. When you create a data generation task, NineData uses this recognition rule to match eligible columns. The Data Preview area displays preview values generated by the current algorithm. Click Refresh to generate new preview values.
Disable simulation rules
Disable simulation rules to control the scope and behavior of data generation for specific business scenarios.
Log in to the NineData Console.
- Click on DevOps > Data Generation in the left navigation bar.
Click the Emulation Template tab on the page, then click Details in the Actions column of the target template.
On the Template Detail page, find the target simulation rule and turn off the toggle switch under the Status column.
tipAfter you turn off the target simulation rule, the rule no longer takes effect. To reactivate it, turn the switch back on.
Delete simulation rules
Delete custom simulation rules that are no longer needed.
Notes
Only user-created custom simulation rules can be deleted. Built-in system rules cannot be removed.
Procedure
Log in to the NineData Console.
- Click on DevOps > Data Generation in the left navigation bar.
Click the Emulation Template tab on the page, then click Details in the Actions column of the target template.
On the Template Detail page, click Delete in the Actions column of the target custom simulation rule.
Create simulation templates
If multiple test environments require different simulation templates, create custom simulation templates based on the default simulation template.
Log in to the NineData Console.
- Click on DevOps > Data Generation in the left navigation bar.
Click the Emulation Template tab on the page, then click Create Emulation Template.
tipYou can also click Duplicate in the Actions column of the target simulation template to customize a new simulation template based on the existing one.
Configure the simulation template, then click OK.
Parameter Description Duplicate Template Select the existing simulation template to copy. Simulation templates include dozens of simulation rules. Copying a template gives you a complete rule list that you can customize as needed. Template Name Enter a name for the simulation template. Description (Optional) Add a brief note or description for the simulation template so other users can understand its purpose.
Disable simulation templates
Disable a simulation template to prevent users from selecting it while the template is being maintained.
Log in to the NineData Console.
- Click on DevOps > Data Generation in the left navigation bar.
Click the Emulation Template tab on the page, find the target simulation template, and turn off the toggle switch under the Status column.
tipAfter you turn off the target simulation template, it cannot be selected when users configure a data generation task. To make it available again, turn the switch back on.
Delete simulation templates
Delete custom simulation templates that are no longer needed.
Notes
Only user-created custom simulation templates can be deleted. Built-in system templates cannot be removed.
Procedure
Log in to the NineData Console.
- Click on DevOps > Data Generation in the left navigation bar.
- Click the Emulation Template tab on the page, then click Delete in the Actions column of the target custom simulation template. In the confirmation window, click OK.
Create rule categories
Rule categories classify simulation rules so users can find the right data generation rules faster when editing simulation templates.
Log in to the NineData Console.
- Click on DevOps > Data Generation in the left navigation bar.
- Click the Emulation Template tab on the page, then click Details in the Actions column of the target template.
- Click Manage Rule Types, then click Add Rule Type in the dialog.
- Enter Classification Name and the corresponding Description (optional), then click OK.
Delete rule categories
Delete custom rule categories that are no longer needed.
Notes
- Only user-created custom rule categories can be deleted. Built-in system categories cannot be removed.
- Before deleting a rule category, make sure it is not associated with any simulation rules. Associated categories cannot be deleted.
Procedure
Log in to the NineData Console.
- Click on DevOps > Data Generation in the left navigation bar.
- Click the Emulation Template tab on the page, then click Details in the Actions column of the target template.
- Click Manage Rule Types. In the dialog, find the custom rule category to delete, click Delete in the Actions column, and then click OK in the confirmation dialog.
Result
Simulation templates and rules are updated. New data generation tasks can use the updated templates to generate test data that better matches your business scenarios.