Help Center > > User Guide> MySQL DB Instance Management (Standard Edition)> Data Plan> Data Generator

Data Generator

Updated at: Sep 29, 2020 GMT+08:00

Scenarios

During the functional testing of a program, a large amount of test data complying with specific rules needs to be inserted into the database. DAS allows you to automatically, efficiently generate test data based on specific rules.

Prerequisites

You have logged in to a MySQL DB instance on the DAS console.

Method 1

  1. On the top menu bar, choose Data Scheme > Data Generator.

    Figure 1 Generating test data-1

  2. On the displayed page, click Create Task. In the displayed dialog box, configure the required parameters.

    Figure 2 Creating a data generation task
    Figure 3 Configuring task parameters
    • Rows to Generate

      A maximum of 1,000,000 rows of data can be generated.

    • Conflict Policy

      If you select Ignore, the system skips the row that contains the conflicts and continues processing subsequent rows. If you select Replace, the system deletes the rows that are causing the conflicts prior to inserting data. If a conflict occurs when a row with the same primary key value is inserted, the original rule will be replaced.

    • Generation type
    • You can set the rules for randomly generated data based on the column settings. For example, if the column type is time, you can set the start time, end time, and format, or set the value to the current time.

  3. After setting the task information, click Preview to check whether the generated data is as expected and then adjust the settings. You can also click Generate to obtain the test data.

    Figure 4 Data preview
    Figure 5 Test data generation progress

  4. In the task list, view details about the generated tasks in the table. You can also delete the task as required.

    Figure 6 Task list

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel