This topic explains how to configure a scheduling dependency for a node across different workflows and workspaces. This ensures a downstream workflow runs only after its upstream workflow completes successfully.
Background information
In DataWorks, you create a node dependency by configuring an upstream node's output as the input for a downstream node. This same approach establishes dependencies across different workflows and workspaces. For more information, see Guide for configuring scheduling dependencies.
Configure a cross-workflow scheduling dependency
A cross-workflow dependency means a node in a downstream workflow depends on the output of a node in an upstream workflow. This example shows how to set up this type of dependency for a workflow that has multiple branch results.
For a workflow with multiple branch results, use a zero load node to aggregate the outputs from all branch nodes. Then, manually set this node's output as the input for the downstream workflow's root node. This establishes the dependency.
Note
- A zero load node is a type of control node that runs without producing data. It is typically used either as a workflow's root node to manage overall scheduling (such as its start time), or as an output node to aggregate results from branch nodes.
- If a workflow has multiple branch results, create a zero load node, for example,
workflow_end_zero_load_node. Configureworkflow_end_zero_load_nodeto depend on the outputs of the upstream branch nodes. The workflow is considered complete only whenworkflow_end_zero_load_noderuns successfully.
To create a cross-workflow dependency for a workflow with multiple branch results, use zero load nodes to configure upstream and downstream dependencies. The following steps demonstrate this process.
- Create an upstream workflow (workflow 1) and a downstream workflow (workflow 2).
- In the upstream workflow 1, create the following zero load nodes:
workflow1_start_zero_load_node: The start node for the branch nodes in upstream workflow 1.workflow1_end_zero_load_node: The output node that aggregates the outputs from the branch nodes in upstream workflow 1.
- In the downstream workflow 2, create the following zero load nodes:
workflow2_start_zero_load_node: The start node for the branch nodes in downstream workflow 2.workflow2_end_zero_load_node: The output node that aggregates the outputs from the branch nodes in downstream workflow 2.
- Dependency between the upstream and downstream workflows: Configure the output of
workflow1_end_zero_load_nodeas the input ofworkflow2_start_zero_load_node. This establishes the cross-workflow dependency.
Note In DataWorks, you create a dependency by configuring an upstream node's output as the input for a downstream node. You can configure a node dependency in three ways: drag-and-drop, manual configuration, or Auto Parse. In this example, the dependency is created manually: In the Parent Nodes section for the downstream node
workflow2_start_zero_load_node, you manually enter the output of the upstream node workflow1_end_zero_load_node to create the dependency.- To create a workflow, see Create a periodic workflow.
- To create a zero load node, see Zero load node.
- To configure a scheduling dependency, see Configure same-cycle scheduling dependencies.
Configure a cross-workspace scheduling dependency
DataWorks supports dependencies between workspaces in the same region. The configuration process is identical to that of a standard scheduling dependency. For detailed instructions, see Configure same-cycle scheduling dependencies.
Note Some older workspaces may not support dependencies from a standard mode workspace to a basic mode one. If you encounter this issue, submit a ticket for assistance.
该文章对您有帮助吗?