Cross-cycle dependencies allow nodes to depend on instances of nodes in the last cycle.

DataWorks supports the following types of cross-cycle dependencies:

  • Dependency on instances of child nodes
    • Node dependency: The current node depends on the last-cycle instances of its child nodes. For example, node A has three child nodes B, C, and D. If you select this node dependency, node A depends on the last-cycle instances of nodes B, C, and D.
    • Business scenario: The current node depends on the last-cycle instances of its child nodes to cleanse the output tables of the current node and check whether the final result is generated properly.
  • Dependency on instances of the current node
    • Node dependency: The current node depends on its last-cycle instances.
    • Business scenario: The current node depends on the data output result of its last-cycle instances.
  • Dependency on instances of custom nodes: You need to manually enter the IDs of the nodes on which the current node depends. You can specify multiple nodes and separate their IDs with a comma (,). Example: 12345,23456.
    • Node dependency: The current node depends on the last-cycle instances of custom nodes.
    • Business scenario: In the business logic, the current node depends on the proper output of other business data that is not processed by the current node.
Note The difference between cross-cycle dependencies and dependencies in the current cycle lies in that cross-cycle dependencies are displayed as dotted lines in Operation Center.

Before deactivating a node, you must delete all dependencies of the node so that other nodes can run properly.

Take the xc_create and xc_select nodes in a workflow as an example. The following figure shows the dependency between the two nodes.Dependency
The following figure shows how the dependency is displayed in Operation Center.Dependency

According to the SQL statements in the preceding figure, the xc_create node creates the xc_1 and xc_2 tables if they do not exist and inserts data into the two tables. The xc_1 and xc_2 tables are the output of the xc_create node.

According to the SQL statements in the preceding figure, the xc_select node queries the xc_1 and xc_2 tables. The auto parsing feature automatically configures the xc_create node as an ancestor node of the xc_select node.

Cross-cycle dependencies: instances of child nodes

Node dependency: depends on instances of child nodes in the last cycle. For example, node A has three child nodes, namely, nodes B, C, and D, and node A depends on instances of nodes B, C, and D in the last cycle.

Business scenario: The current node depends on instances of child nodes in the last cycle to cleanse the output tables of the current node. The current node starts to run in the current cycle only when the child nodes were run successfully in the last cycle.

Select Cross-Cycle Dependencies and set Depend On to Instances of Child Nodes for the xc_create node.

Cross-cycle dependencies: instances of current node

Node dependency: The current node depends on the running status of the instance of the current node in the last cycle. If the current node is not finished in the last cycle, the current node will not run in the current cycle.

Business scenario: The current node depends on the data cleansing result in the last cycle. In this example, Instance Recurrence is set to Hour.

The following figure shows how the dependency is displayed under Operation Center > Cycle Task Maintenance > Cycle Instance.View information

Cross-cycle dependencies: instances of custom nodes

Node dependency: The output tables of the xc_information node are not used in the code of the xc_create node. However, the xc_create node depends on the data output result of the xc_information node in the last cycle according to the business logic. That is, the xc_create node depends on the instance of the xc_information node in the last cycle.

Business scenario: In the business logic, the xc_create node depends on proper data output the xc_information node in the last cycle, but the xc_create node does not process the output data of the xc_information node.

According to the following figure, the ID of the xc_information node is 1000374815.

Set Depend On to Instances of Custom Nodes and enter the node ID 1000374815 for the xc_create node.

The following figure shows how the dependency is displayed under Operation Center > Cycle Task Maintenance > Cycle Instance.