Setting Up Data Generator
Last modified: November 14, 2024
This topic describes how to set up Data Generator to generate test data.
Note
Before generating test data, you should back up the database you’re going to populate.
If you’re not satisfied with the results, you can adjust the settings and repeat the data generation.
1. On the menu bar, go to Database > Tasks > New Data Generation. The Data Generator Project Properties dialog opens.
2. On the Connection tab, choose the connection and database for data generation, and then click Next.
3. On the Options tab, set the required options and click Open.
4. In the .dgen document that opens, do the following:
- In the Tables and columns to populate pane, select the tables and columns for which you want to generate data.
- Define how you want the data to be generated: click the table or column name and specify the details in the generation settings pane. All changes are displayed in the preview pane in real time.
Note
You can get errors during data generation—for example, if you include a column which is the foreign key of a table you didn’t include into generation. To resolve such issues, click the table in question, locate the Related tables section of the Table generation settings pane, and include or exclude parent and child tables from data generation.
5. Click Populate data to the target database. The Data Population Wizard opens.
6. On the Output tab, select one of the options and click Next:
- Open the data population script in the internal editor to add custom data to the database.
- Save the SQL script to a file.
- Execute the data population script against the database immediately.
7. On the Options tab, select general data population options and click Next.
8. On the Additional Scripts tab, if needed, enter or select the script to be executed before or after data population, and then click Next. You may need this option in a number of cases, for example, to drop the old data or disable triggers before data generation and then enable them again.
9. On the Summary tab, view the generation action plan and the details of generation errors and warnings, if any, that inform you when there may be a problem with the data generation.
10. Click Generate to finish the process.
Want to find out more?
Overview
Take a quick tour to learn all about the key benefits delivered by dbForge Studio for MySQL.
All features
Get acquainted with the rich features and capabilities of the tool in less than 5 minutes.
Request a demo
If you consider employing this tool for your business, request a demo to see it in action.