This topic describes how to set up Data Generator to generate test data.
Tip
Before generating data, back up the database you want to populate.
If you’re not satisfied with the results, you can adjust the settings and regenerate the data.
To set up Data Generator:
Open the Data Generator Project Properties dialog by doing one of the following:
2. On the Connection tab, specify the connection, choose the connection and database for data generation, then click Next.
Note
If you want to create a new connection, click Manage in the Connection list. In the Connection Manager dialog that opens, click New to add a new connection. For more information, see Managing connections.
3. On the Options tab, set up data generation options.
The table describes the data generation options.
Name | Group | Description | Default value |
---|---|---|---|
By specified number of | Row distribution mode | Set the number of rows to populate. | 1000 rows |
By proportion of existing data in volume of | Row distribution mode | Specify the percentage of rows to populate. | 10% |
By generation of data by time | Row distribution mode | Specify the time period in seconds during which data will be generated for each table. | 10 sec |
Truncate data from table before generation | Row distribution mode | Controls whether existing data in the target table is removed before new test data is generated.
|
|
Random by timestamp | Value distribution mode | Select the option if you want to populate every subsequent data generation with new random numbers. | |
Random by seed | Value distribution mode | Select the option and specify the seed value based on which the values will be generated. When you repopulate the column, you will get the same data collection. | 1 |
Sequential | Value distribution mode | Select the option to generate the values sequentially. | |
Set values to be unique | Column properties | Select the checkbox to make the generated values unique. | |
Include NULL values % of rows | Column properties | Select the checkbox and specify the percentage of NULL values to be generated. |
10% |
Include empty values % of rows | Column properties | Select the checkbox and specify the percentage of empty values to be generated. | 10% |
Country-specific data | Column properties | Choose a country to which conventions the generated data will follow. | United States |
4. Click Open to open a data generation project with the .dgen
extension.
5. In the Tables and columns to populate pane, select the tables and columns for which you want to generate data.
6. Select the table and set up table generation settings. Repeat this step for each table you want to populate with data.
7. Select the column and set up column generation settings. Repeat this step for each selected column.
Note
All changes are displayed in the preview pane in real time.
Warning
Data generation may fail if a column includes a foreign key that references a table not included in the generation process.
To resolve the issue:
1. Select the table causing the error.
2. In the Table generation settings pane, navigate to the Related tables section.
3. Include or exclude the related parent and child tables as needed.
8. Click Populate data to the target schemas to open the Data Population Wizard.
9. On the Output tab, select the output option to manage a data population script, then click Next:
10. On the Options tab, select general data population options and then click Next.
Tip
You can click the name of an option to view its detailed description.
In the search box, you can start typing the option name. The options matching your search will be highlighted.
To save the options you’ve set for later use, click Save As My Defaults.
To use the default settings of the tool, click Devart Defaults.
To use the options you saved earlier, click My Defaults.
11. On the Additional Scripts tab, enter or choose the script you want to execute before or after data population, then click Next.
You might use this option in scenarios, such as dropping existing data or temporarily disabling triggers before data generation, then re-enabling them afterward.
12. On the Summary tab, review the data generation action plan and check for any errors or warnings that highlight potential problems.
13. Click Generate to complete the data generation process.