Data Management (DMS) provides the task orchestration feature. You can use this feature to create task flows and schedule task flows to run as needed. This feature allows you to manage task flows on a GUI, send notifications by using multiple channels, and perform various O&M operations. This way, you can use this feature to perform data archiving, data integration, data development in data warehouses, and data mining.
Preparations
This example shows you how to periodically transfer the historical data of the previous
six months in a table named
task_data
to another table and delete the historical data from the task_data
table. In this example, the task_data
table is created in advance. You can use the following statements to create the table
and insert data:/** Create a table. **/
CREATE TABLE task_data (
`id` bigint(20) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT COMMENT 'Primary key',
`gmt_create` DATETIME NOT NULL COMMENT 'Creation time',
`gmt_modified` DATETIME NOT NULL COMMENT 'Modification time',
`content` TEXT COMMENT 'Test data'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Table for a task orchestration test';
/** Insert data. **/
INSERT INTO task_data( `gmt_create`, `gmt_modified`, `content`) VALUES ('2020-01-01 01:00:00', '2020-01-01 01:00:00', 'value1');
INSERT INTO task_data( `gmt_create`, `gmt_modified`, `content`) VALUES ('2020-02-01 01:00:00', '2020-02-01 01:00:00', 'value2');
INSERT INTO task_data( `gmt_create`, `gmt_modified`, `content`) VALUES ('2020-03-01 01:00:00', '2020-03-01 01:00:00', 'value3');
INSERT INTO task_data( `gmt_create`, `gmt_modified`, `content`) VALUES ('2020-04-01 01:00:00', '2020-04-01 01:00:00', 'value4');
INSERT INTO task_data( `gmt_create`, `gmt_modified`, `content`) VALUES ('2020-05-01 01:00:00', '2020-05-01 01:00:00', 'value5');
INSERT INTO task_data( `gmt_create`, `gmt_modified`, `content`) VALUES ('2020-06-01 01:00:00', '2020-06-01 01:00:00', 'value6');
INSERT INTO task_data( `gmt_create`, `gmt_modified`, `content`) VALUES ('2020-07-01 01:00:00', '2020-07-01 01:00:00', 'value7');
INSERT INTO task_data( `gmt_create`, `gmt_modified`, `content`) VALUES ('2020-08-01 01:00:00', '2020-08-01 01:00:00', 'value8');
INSERT INTO task_data( `gmt_create`, `gmt_modified`, `content`) VALUES ('2020-09-01 01:00:00', '2020-09-01 01:00:00', 'value9');
INSERT INTO task_data( `gmt_create`, `gmt_modified`, `content`) VALUES ('2020-10-01 01:00:00', '2020-10-01 01:00:00', 'value10');
Procedure
Result
To view the running result, click the Operation Centre icon.

Note On the Operation Centre page, you can view the status of each run of the task flow. For example, the task
flow may be in the Success, Fail, or Running state. You can also view the time points at which the task flow starts and ends running
and perform operations on the task flow. For example, you can pause or rerun the task
flow.