This topic describes how to configure recurrence and dependencies for a node in DataWorks. The sync node write_result that is scheduled by week is used as an example.

Prerequisites

The sync node write_result is created. For more information, see Create a sync node.

Background information

DataWorks has a powerful scheduling engine to trigger nodes based on the recurrence and dependencies of the nodes. DataWorks ensures that tens of millions of nodes run accurately and punctually per day based on directed acyclic graphs (DAGs). In the DataWorks console, you can set the recurrence to minutely, hourly, daily, weekly, or monthly. For more information, see Time properties.

Configure recurrence for the sync node

  1. Go to the DataStudio page.
    1. Log on to the DataWorks console.
    2. In the left-side navigation pane, click Workspaces.
    3. In the top navigation bar, select the region where your workspace resides, find the workspace, and then click Data Analytics in the Actions column.
  2. Find the workflow to which the sync node write_result belongs and double-click the sync node.
  3. On the configuration tab of the node, click Scheduling configuration in the right-side navigation pane.
    Note In a manually triggered workflow, all nodes must be manually triggered, and cannot be automatically scheduled by DataWorks.
  4. In the Time attribute section, set the parameters as required.
    Scheduling configuration tab
    Parameter Description
    How to generate an instance The time to generate the first instance. Valid values: T +1 generated the next day and Generate immediately after publishing.
    Time attribute The mode in which the node is run. Valid values: Normal Scheduling and Empty run scheduling.
    Rerun attribute Specifies whether to allow the node to be rerun. Valid values: Run again after success or failure, Do not re-run after successful operation, and re-run after failed operation, and Do not rerun after successful or failed operation.
    Error automatic rerun Specifies whether to automatically rerun the node when an error occurs. This parameter appears only if the Rerun attribute parameter is set to Run again after success or failure or Do not re-run after successful operation, and re-run after failed operation. After you select this check box, the node is automatically rerun when an error occurs. This parameter does not appear if you set the Rerun attribute parameter to Do not rerun after successful or failed operation. In this case, the node is not rerun when an error occurs.
    Effective Date The validity period of the node. Specify the start and end dates of the validity period as required.
    Suspend scheduling Specifies whether to skip execution of the node.
    Scheduling cycle The recurrence of the node. Valid values: Minutes, Hours, Day, Week, and Month. In this example, set the value to Week.
    Timing scheduling Specifies whether to periodically schedule the node. This check box is selected by default.
    Specify time The time when the node is run. For example, you can configure the node to run at 02:00 every Tuesday.
    cron expression The CRON expression of the time you specified, which cannot be changed.
    Rely on previous cycle Specifies whether the node depends on the result of the last cycle.

Configure dependencies for the sync node

After you configure the recurrence for the sync node write_result, you can continue to configure dependencies for the sync node.

You can configure the parent node on which the sync node depends. After that, the scheduling system triggers the sync node only after the instance of the parent node is run.

For example, the instance of the sync node is not triggered until the instance of its parent node insert_data is run.

By default, the scheduling system creates a node named in the format of Workspace name_root for each workspace as the root node. If no parent node is configured for the sync node, the sync node depends on the root node.

Commit the sync node

  1. On the configuration tab of the write_result node, click the Save icon icon in the toolbar.
  2. Commit the node.
    Notice You must set the Rerun attribute and Dependent upstream node parameters before you can commit the node.
    1. Click the Submit icon icon in the toolbar.
    2. In the Submit New version dialog box, enter your comments in the Change description field.
    3. Click OK.
    In a workspace in standard mode, you must click Publish in the upper-right corner after you commit the sync node.
    A node must be committed to the scheduling system so that the scheduling system can automatically generate and run instances for the node. The scheduling system runs these instances at the specified time from the next day based on the recurrence settings.
    Note If you commit a node after 23:30, the scheduling system automatically generates and runs instances for the node from the third day.

What to do next

Now you have learned how to configure recurrence and dependencies for a sync node. You can proceed with the next tutorial. In the next tutorial, you will learn how to perform O&M on the committed node and troubleshoot errors based on the operational logs. For more information, see Run a node and troubleshoot errors.