Select a scheduling dependency type (cross-cycle scheduling dependency)

更新时间:
复制 MD 格式

Cross-cycle scheduling dependencies allow a node's current-cycle instance to run only after the instances of one or more specified nodes in the previous cycle succeed. Use cross-cycle dependencies when a node needs data produced by another node on the previous day, or when an hourly or minutely node must wait for its own previous-cycle instance to complete.

Precautions

Take note of the following items when you configure cross-cycle scheduling dependencies.

Item

Description

References

Display of cross-cycle scheduling dependencies

Cross-cycle scheduling dependencies are displayed as dashed lines in the directed acyclic graph (DAG) of a node.

Appendix: DAG view features

Confirmation of the requirement of configuring same-cycle scheduling dependencies after cross-cycle scheduling dependencies are configured

After you configure scheduling dependencies for a node, the node runs only after all its ancestor nodes succeed.

By default, same-cycle scheduling dependencies are automatically parsed. If cross-cycle dependencies are configured for a node, verify whether same-cycle dependencies are also needed. If not, delete the auto-generated same-cycle dependencies to avoid blocking the node.

Configure same-cycle scheduling dependencies

Complex scenarios in which cross-cycle scheduling dependencies are required

In some complex scenarios, same-cycle dependencies may not meet your business requirements. You can configure cross-cycle dependencies instead.

For example, if a daily node depends on an hourly node, the daily instance depends on all hourly instances generated on the current day by default.

Scheduling principles for complex dependencies

Preview of scheduling dependencies of a node

To prevent an auto-triggered node in the production environment from being delayed by unexpected dependencies, preview the scheduling dependencies of the node before you deploy it. This ensures that the auto-triggered node's instances run as expected.

Appendix: Use the features provided in a DAG

Node deployment

After you configure cross-cycle scheduling dependencies for a node, deploy the node and its ancestor nodes to the production environment. After deployment, you can view the cross-cycle dependencies in Operation Center in the production environment.

Deploy a node or a workflow

Entry point

Go to the node editing page in Data Studio. In the navigation pane on the right, click Add Dependency. On the Scheduling Dependencies tab, you can click Parse I/O from Code for the system to suggest dependencies, or click Add Dependency to configure one manually. When adding a dependency, the Dependency Type drop-down list provides four options: Same-cycle Dependency, Cross-cycle Dependency, Cross-cycle Self Dependency, and Cross-cycle Dependency on a Level-1 Descendant Node. Select a dependency type, configure the Ancestor Object, and click Add to complete the configuration.

Cross-cycle scheduling dependency types

Dependency type

Description

Scenario

Dependency on the instance generated for the current node in the previous cycle

The current-cycle instance of a node runs only after the previous-cycle instance of the same node succeeds.

The current-cycle instance of a node depends on the latest business data produced by the previous-cycle instance of the same node.

Dependency on the instances generated for the level-1 descendant nodes of the current node in the previous cycle

The current-cycle instance of the current node runs only after the previous-cycle instances of the node's descendant nodes succeed.

The current-cycle instance of the current node depends on whether its output table data in the previous cycle was cleansed by the descendant nodes' instances.

Dependency on the instances generated for one or more specified nodes in the previous cycle

The current-cycle instance of the current node runs only after the previous-cycle instances of one or more specified nodes succeed.

The current-cycle instance of the current node depends on the output table data of one or more other nodes in the previous cycle based on the business logic, even though the data is not referenced in the code.

Dependency on the instance generated for the current node in the previous cycle

The current-cycle instance of a node depends on the latest business data produced by the previous-cycle instance of the same node. Check the following dependencies:

  • The current-cycle instance of an hourly node depends on the previous-cycle instance of the same node.

    image
  • The current-cycle instance of a daily node depends on the previous-cycle instance of the same node.

    image

Configure scheduling dependencies:

  1. Go to the configuration tab of Node A in Data Studio. Click the Properties tab in the right-side navigation pane. Click Scheduling Dependencies on the tab that appears.

  2. In the Node Dependencies section, click Add Dependency. In the form that appears, configure the following settings:

    From the Dependency Type drop-down list, select Cross-cycle Self Dependency. Click the Add button to set the previous cycle's instance of node A as an ancestor dependency.

  3. Click Save to save the scheduling dependency configurations.

Note

The running results of hourly instances in different scheduling cycles and daily instances in different scheduling cycles affect each other.

If a daily node depends on an hourly or minutely node, the start time of the daily instance is affected by whether the hourly or minutely node has a self-dependency configured.

  • Hourly or minutely node without self-dependency

    If the hourly or minutely node does not have a self-dependency, the daily instance depends on all hourly or minutely instances on the current day. In this case, the daily node aggregates and processes all table data from all hourly or minutely instances on the current day.

  • Hourly or minutely node with self-dependency

    If the hourly or minutely node has a self-dependency, the daily instance depends only on the hourly or minutely instance whose scheduling time is closest, based on the principle of scheduling time proximity.

For more information, see Appendix 1: Complex dependency scenarios.

Dependency on the instances generated for the level-1 descendant nodes of the current node in the previous cycle

With this dependency type, the current-cycle instance of a node runs only after the previous-cycle instances of the node's level-1 descendant nodes succeed.

image
  • Configure scheduling dependencies:

    1. Go to the configuration tab of Node C in Data Studio. Click the Properties tab in the right-side navigation pane. Click Scheduling Dependencies on the tab that appears.

    2. In the Node Dependencies section, click Add Dependency. In the form that appears, configure the following settings:

      Set the Dependency Type parameter to Cross-cycle Dependency on Level-1 Descendant Node. The system automatically searches for the nodes on which the current node needs to depend based on the latest code in the configuration tab of the current node. You need to select Nodes A and B as the ancestor nodes of the current node.

    3. Click Save to save the scheduling dependency configurations.

  • Flowchart description:

    • Description of Instance C1:

      • Data processing: Instance C1 processes data in the output tables of Instances A and B in the T-2 partition.

      • Data output: Instance C1 generates data in Table C1 in the T-1 partition.

    • Descriptions of Instances A1 and B1:

      • Data processing: Instances A1 and B1 process data in the output table of Instance C1 on the T-1 day.

      • Data output: Instances A1 and B1 generate data in Tables A1 and B1 on the T-1 day.

    • Description of Instance C2:

      • Data processing: Instance C2 processes data in the output tables of Instances A1 and B1 in the T-1 partition.

      • Produces: Data for table C2 in the T partition.

    • Descriptions of Instances A2 and B2:

      • Processes: Data from the output table(s) of instance C2 on day T.

      • Data output: Instances A2 and B2 generate data in Tables A2 and B2 on the T day.

Dependency on the instances generated for one or more specified nodes in the previous cycle

With this dependency type, the current-cycle instance of a node runs only after the previous-cycle instances of one or more specified nodes succeed.

image
  • Configure scheduling dependencies:

    1. Go to the configuration tab of Node B in Data Studio. Click the Properties tab in the right-side navigation pane. Click Scheduling Dependencies on the tab that appears.

    2. In the Node Dependencies section, click Add Dependency. In the form that appears, configure the following settings:

      • Set the Dependency Type parameter to Cross-cycle Dependency.

      • Ancestor Object: Set the parameter to Name and select Node D, which does not belong to the workflow formed by Nodes A, B, and C.

    3. Select Node D as the ancestor node of Node B.

  • Flowchart description: Node C has two descendant nodes: Node A and Node B. The current-cycle instance of Node B depends on the previous-cycle instance of Node D. In this example, the current cycle is T and the previous cycle is T-1. The instance of Node B in cycle T runs only after the instance of Node D in cycle T-1 succeeds.

Preview scheduling dependencies

After you configure scheduling dependencies for a node, you can preview them. For more information, see Next steps: Verify dependencies.