Managing Simulation Templates
Simulation templates serve as the basis for data generation. By pre-defining data generation configurations, users can quickly create data generation tasks that meet business needs, reducing the workload of manual configuration each time.
Prerequisites
To create a simulation template, the following conditions must be 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.
Creating 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 on the Emulation Template tab on the page, then click Details in the Actions column on the right side of the target template.
On the Template Detail page, click Create Emulation Rule on the right side.
tipYou can also click Duplicate in the Actions column on the right side of the target simulation rule to customize a new simulation rule based on the existing one.
Define the following parameters for the simulation rule, then click OK.
Parameter Description Name Enter the name of the simulation rule. Rule Type Select the simulation rule category. NineData comes with 7 built-in rule categories. If you need to create a new category, see Create Rule Category. Generating algorithm Choose the generation algorithm, which is the core part of the data generation function, ensuring that the generated data meets the scenario requirements. After selection, you also need to choose the corresponding parameters for this algorithm. The parameters for each algorithm vary, please refer to the page display for accuracy. Null Ratio(%) The percentage of null values generated when creating data. For example, if set to 50, there is a 50% chance of being null.
Note: Only available when the target field allows NULL values.Detection Rules(Optional) The automatic recognition method of the column, written through a conditional judgment statement in the Java language. When creating a data generation task, the simulation rule will automatically match the eligible columns based on this recognition rule. The preview values generated by the current algorithm will be displayed in the Data Preview on the right side of the page. Click Refresh to display new preview values.
Disabling Simulation Rules
NineData supports disabling specific simulation rules to control the scope and behavior of data generation, allowing users to adjust the data generation logic during the process according to specific business scenarios or needs.
Log in to the NineData Console.
- Click on DevOps > Data Generation in the left navigation bar.
Click on the Emulation Template tab on the page, then click Details in the Actions column on the right side 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 turning off the target simulation rule, the rule will no longer take effect. To reactivate the rule, simply turn the switch back on.
Deleting Simulation Rules
If a custom simulation rule is no longer needed, it can be deleted.
Notes
Only manually created custom simulation rules can be deleted; system-built-in rules cannot be removed.
Operation Steps
Log in to the NineData Console.
- Click on DevOps > Data Generation in the left navigation bar.
Click on the Emulation Template tab on the page, then click Details in the Actions column on the right side of the target template.
On the Template Detail page, click Delete in the Actions column on the right side of the target custom simulation rule.
Creating Simulation Templates
If you have multiple test environments that require the application of multiple simulation templates, you can 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 on the Emulation Template tab on the page, then click Create Emulation Template on the right side of the page.
tipYou can also click Duplicate in the Actions column on the right side of the target simulation template to customize a new simulation template based on the existing one.
Define the following parameters for the simulation template, then click OK.
Parameter Description Duplicate Template Select which existing simulation template to base the creation on. Simulation templates include dozens of simulation rules. By copying, you can first obtain a complete list and then customize it as needed. Template Name Enter the name of the simulation template. Description(Optional) Add a brief note or description for the simulation template, which is important for later management and reuse of the template. Other users can quickly understand the purpose of the template configuration.
Deleting Simulation Templates
If a custom simulation template is no longer needed, it can be deleted.
Notes
Only manually created custom simulation templates can be deleted; system-built-in templates cannot be removed.
Operation Steps
Log in to the NineData Console.
- Click on DevOps > Data Generation in the left navigation bar.
- Click on the Emulation Template tab on the page, then click Delete in the Actions column on the right side of the target custom simulation template. In the pop-up confirmation window, click OK.
Creating Rule Categories
Rule categories are used to classify various simulation rules, making it easy for users to quickly find the corresponding data generation rules when editing simulation templates through categories.
Log in to the NineData Console.
- Click on DevOps > Data Generation in the left navigation bar.
- Click on the Emulation Template tab on the page, then click Details in the Actions column on the right side of the target template.
- Click Manage Rule Types on the right side of the page, then click Add Rule Type in the pop-up window.
- Enter Classification Name and the corresponding Description (optional), then click OK.
Deleting Rule Categories
If a custom rule category is no longer needed, it can be deleted.
Notes
- Only manually created custom rule categories can be deleted; system-built-in categories cannot be removed.
- When deleting a rule category, ensure that it is not associated with any simulation rules, otherwise, it cannot be deleted.
Operation Steps
Log in to the NineData Console.
- Click on DevOps > Data Generation in the left navigation bar.
- Click on the Emulation Template tab on the page, then click Details in the Actions column on the right side of the target template.
- Click Manage Rule Types on the right side of the page, then find the custom rule category you want to delete in the pop-up window, click Delete in the Actions column on the right side, and then click OK in the pop-up confirmation window.