This topic describes how to configure dependencies for nodes across workflows or workspaces. After you configure dependencies for nodes across workflows, you can run a descendant workflow only after its ancestor workflows are successfully run.

Background information

DataWorks allows you to configure the output of a node as the input of another node to establish dependencies between the nodes. You can configure dependencies for nodes across workflows or workspaces. For more information, see Scheduling dependency configuration guide.

Configure dependencies for nodes across workflows

Dependencies across workflows are formed if you use the output of a node in a workflow as the input of a node in another workflow. This section describes how to configure dependencies for branch nodes across workflows.

If you want to configure dependencies for branch nodes in a workflow on nodes in another workflow, you must use a zero load node to aggregate the outputs of the branch nodes in the current workflow, and configure the output of the zero load node as the input of the root node of the other workflow.
Note
  • A zero load node is a control node that supports only dry-run scheduling and does not generate data. In most cases, a zero load node serves as the root node of a workflow or the output node of multiple branch nodes. For example, you can use a zero load node to determine the scheduling time of a workflow and determine whether to schedule other nodes.
  • If a workflow contains multiple branch nodes, you must create a zero load node and specify the zero load node as the descendant node of the branch nodes. For example, you can create a zero load node named in the format of Workflow_end_Zero load node. This way, the zero load node depends on the outputs of the branch nodes. After the zero load node is successfully run, the workflow is also successfully run.
The following example shows how to use zero load nodes to configure dependencies for branch nodes across workflows. Configure dependencies for nodes across workflows
  • Create two workflows: Workflow 1 and Workflow 2. Then, configure Workflow 1 as the ancestor workflow of Workflow 2.
  • Create the following zero load nodes in Workflow 1:
    • Workflow1_start_Zero load node: the start node of the branch nodes in Workflow 1.
    • Workflow1_end_Zero load node: the output node that is used to aggregate the outputs of branch nodes in Workflow 1.
  • Create the following zero load nodes in Workflow 2:
    • Workflow2_start_Zero load node: the start node of the branch nodes in Workflow 2.
    • Workflow 2_end_Zero load node: the output node that is used to aggregate the outputs of branch nodes in Workflow 2.
  • Configure dependencies between Workflow 1 and Workflow 2: Configure the output of Workflow1_end_Zero load node as the input of Workflow2_start_Zero load node. This way, dependencies for branch nodes across workflows are configured.
Note DataWorks allows you to configure the output of a node as the input of another node to establish dependencies between the nodes. You can use one of the following methods to configure dependencies: drag nodes in a directed acyclic graph (DAG) to configure dependencies between the nodes, enable the automatic parsing feature, and configure dependencies. In the preceding example, the dependencies are configured by configuring the output of Workflow1_end_Zero load node as the input of Workflow2_start_Zero load node.

Configure dependencies for nodes across workspaces

DataWorks also allows you to configure dependencies for nodes across workspaces that reside in the same region. You can configure the output of a node in a workspace as the input of a node in another workspace to establish dependencies between the nodes. For example, you can configure the output of Node A in Workspace A as the input of Node B in Workspace B to establish dependencies between the nodes. The configuration method is the same as the method that is used to configure dependencies in common scenarios. For more information, see Configure same-cycle scheduling dependencies.
Note Nodes in workspaces in standard mode cannot depend on nodes in workspaces in basic mode. To resolve this issue, submit a ticket.