Set up Data Generator

This topic describes how to generate data using the built-in Data Generator tool.

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.

Note
If you want to create a new connection, click Manage in the Connection dropdown 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 the data generation options:

  • Under Row distribution mode:

    • By specified number of option: Set the number of rows to populate. The default number is 1000 rows.
    • By proportion of existing data in volume of: Specify the percentage of rows to populate.
    • By generation of data by time: Specify the time period in seconds during which data will be generated for each table.
  • If you don’t want the selected table to be truncated, clear the Truncate data from table before generation checkbox.

  • Under Value distribution mode:

    • Random by timestamp: Select the option if you want every subsequent data generation to be populated with new random numbers.
    • Random by seed: 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.
    • Sequential: Select the option to generate the values sequentially.
  • Under Column properties:

    • Set values to be unique: Select the checkbox to make the generated values unique.
    • Include NULL values % of rows: Select the checkbox and specify the percentage of NULL values to be generated.
    • Include empty values % of rows: Select the checkbox and specify the percentage of empty values to be generated.

Options tab of the Data Generator Project Properties dialog

4. Click Open to open the data generation project.

5. 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.

Data generation document with a tree pane, generation settings pane, and data preview

6. Click Green arrow icon Populate data to the target database. The Data Population Wizard opens.

7. On the Output tab, select one of the following options and then click Next:

  • Open the data population script in the internal editor.
  • Save the script to a file. In this case, specify the path to the file.
  • Execute the data population script against the database without reviewing it.

Output tab of the Data Population Wizard

8. On the Options tab, select general data population options and then click Next.

Note
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.

Options  tab of the Data Population Wizard

9. On the Additional Scripts tab, if needed, enter or select the script to be executed before or after data population, and then click Next.

10. 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.

11. Click Generate to finish the process.

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Studio for PostgreSQL.
All Features

All features

Get acquainted with the rich features and capabilities of the Studio in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the Studio for your business, request a demo to see it in action.
Ready to start using dbForge Studio for PostgreSQL?