After you create a data mocking task in OceanBase Developer Center (ODC), you can view the task in the task list on the Mock Data tab of the Task Center panel.
Task list
On the management page of the target database connection, click Task Center in the top navigation bar to open the Task Center panel. Then, click Mock Data to display the task list.
The following table describes the columns in the task list. You can filter and sort tasks by some of the columns.
Column | Description |
Task ID | The ID of the data mocking task. |
Task Type | The task type specified when the task was created. The following task types are supported: import, export, data mocking, and database change. |
Connection | The name of the database connection to which the task belongs. You can click the filter icon to filter the tasks by connection. |
Database | The database to be changed. You can click the search icon to search for the database to which the task belongs. |
Creator | The user who created the data mocking task. You can click the search icon to search for the creator. |
Creation Time | The date and time when the task was generated. |
Task Status | The current status of the task. ODC provides different management actions for tasks in different states. |
Actions | The actions you can take. Valid values: View, Approve/Reject, Abort, and Download.
|
Create a data mocking task
Log on to ODC and enter the management page of the target connection. In the top navigation bar, click Task Center. On the Task Center panel that appears, click + on the right side of Mock Data, and a new data mocking task panel will pop up.
In the Create Mock Data Task panel, specify the fields described in the following table.
Field
Description
Connection
The name of the database connection to which the task belongs.
Database
The database to be changed.
Table
The table for generating data.
In the Mock Data panel, select the table from the drop-down list under Table. The drop-down list displays all the tables in the current instance.
Mock Data Volume
The volume of data to be generated.
In the Mock Data panel, set Mock Data Volume to specify the desired number of data rows to be generated. The default value is 1000. The system can generate up to 1,000,000 rows of data. You can set the value to an integer between 1 and 1000000.
Batch Size
The size of data processed in a batch.
In the Mock Data panel, set Batch Size to specify the number of rows generated that trigger a
COMMIT
operation. The default value is 200. That is, a commit operation is performed once every 200 rows are generated. The maximum value supported is 500. You can set the value to an integer between 1 and 500.Empty Table Before Inserting Mock Data
Specifies whether to empty the table before inserting mock data into it.
In the Mock Data panel, select Yes or No under Empty Table Before Inserting Mock Data to specify whether or not to empty the table before inserting mock data.
Data Conflict Handling Mode
The data conflict handling mode.
In the Mock Data panel, specify Data Conflict Handling Mode by selecting a mode from the drop-down list. ODC supports the following modes:
Ignore: This option is selected by default. The data conflicting with existing data is not inserted.
Overwrite: If a data conflict occurs, the original data is deleted, and the new data is inserted.
Terminate: If a data conflict occurs, the data mocking task is terminated.
Rule Settings
The data generation rules.
In the Mock Data panel, the Rule Settings table displays Field Name and Field Type based on the table you selected before. You can specify the data generation rules for the target fields in the Rule and Rule Details columns. The Rule column provides built-in rules based on the field type for you to choose from. The Rule Details column displays the detailed information for the rule that you selected. You can click the edit icon to edit the information.
Click Submit. The data mocking task is created.
View a data mocking task
Task information
Click View in the Actions column of the row where the target task is located. The Task Details panel appears. Click the Task Information tab in the panel to view the basic task information and the data mocking settings.
Item | Description |
Basic information | Displays the basic information of the task in the following fields: Task ID, Database, and Task Type. |
Data mocking settings | Displays the settings specified when the data mocking task was created in the following fields: Table, Mock Data Volume, Batch Size, Empty Table Before Inserting Mock Data, Data Conflict Handling Mode, Actual Insertion Records, Conflict Records, Ignore Insertion, Clear Records, and Rule Settings. |
Task logs
Click View in the Actions column of the row where the target task is located. The Task Details panel appears. Click the Task Logs tab in the panel to view the alert logs and all logs of the task.
Field | Description |
All Logs | Displays the INFO, ERROR, and WARN logs of the task. |
Alert Logs | Displays the ERROR and WARN logs of the task. When a task fails, you can view the error message in the alert logs. |