Create a script-based sync task
You can create sync tasks using scripts. This topic describes how to create a script-based sync task.
Prerequisites
-
A corresponding data source must already exist. For more information, see Create a new data source.
-
The physical tables for the source and destination are created. For more information, see Obtain a physical table.
-
A folder for the sync task is added. For more information, see Add a folder for a script-based sync task.
Procedure
-
Log on to the Data Resource Platform console.
-
In the upper-left corner of the page, click the
icon and select Collaboration. -
In the top menu bar, click the
icon, select the target working group, and click Asset Processing. -
In the navigation pane on the left, click the
icon, hover over Configuration-based Synchronization, and click the
icon. -
On the Configuration-based Synchronization page, click the Create Configuration-based Sync Task button.
-
On the right side of the canvas, configure the script on the Script Configuration tab.
Parameter
Description
Task Name
You can customize the task name.
Category
Select a task folder.
Description
Enter a custom description for the task.
Link Mode
Select a link mode for the task. The Offline and Real-time modes are supported.
Task Scheduling Type
Select a scheduling type for the task and configure scheduling information. For more information, see Create an offline data sync task.
Advanced Configuration
Click Show Advanced Configuration to configure the resource specifications, automatic timeout and stop, and rate limit for the task. For more information, see Create an offline data sync task.
-
On the canvas, enter the task script and click the save icon.
Note-
When you enter the script, refer to the script specifications on the right side of the canvas.
-
In the toolbar above the canvas, you can click the
icon to reference the script of a saved task.
-
-
In the toolbar above the canvas, click the run icon to view the operational log and the result of the script.
The script task is successfully created upon a successful run.
Related operations
| Operation |
Description |
| View a sync task |
In the task list, find the target sync task, click More in the Operation column, and select View to view the details of the sync task. |
| Modify a sync task |
In the task list, find a sync task that is not running, click More in the Operation column, and select Modify to modify the sync task. |
| Delete a sync task |
For a sync task that is not published, find the target sync task, click More in the Operation column, and select Delete to delete the sync task. |
| View dependent nodes |
Find the target sync task, click More in the Operation column, and select Dependent Nodes to view the ancestor and descendant nodes of the current task. |
What to do next
After you create a sync task, you need to publish it. For more information, see Publish a script-based sync task.