All Products
Search
Document Center

DataWorks:Merge node

Last Updated:Mar 26, 2026

When a branch node has mutually exclusive branches, exactly one branch runs and the other receives the status Branch Not Selected. If a downstream node depends directly on both branches, it inherits Branch Not Selected from the skipped branch and enters a dry-run state — the node is considered to have run, but its task is never executed. The same applies to all of that node's descendants.

A merge node solves this problem. It consolidates the run statuses of multiple upstream branch nodes into a single dependency point. Downstream nodes depend on the merge node instead of the individual branches, so a skipped branch no longer causes downstream nodes to be skipped.

Prerequisites

Before you begin, make sure you have:

Supported editions

Merge nodes are available in DataWorks Standard Edition and higher. For details, see DataWorks editions.

How it works

The following example illustrates the problem and solution.

Branch node C has two mutually exclusive branches, C1 and C2. Both write data to the same MaxCompute table. Downstream node B needs the output from that table.

SetupBehavior
Node B depends directly on C1 and C2One branch always gets Branch Not Selected, so B enters a dry-run state and never executes.
Merge node J merges C1 and C2; node B depends on JB runs correctly after whichever branch completes.

Step 1: Define the merge logic

  1. On the node configuration tab, go to the merge logic definition section. Search for the branch nodes you want to merge by node output, node ID, or node name.

  2. Click the image icon to add a node to the Merge Condition Settings section. Repeat for each branch node you want to include.

  3. In Merge Condition Settings, configure the merge logic condition and the run status condition for each branch node.

    Merge logic conditions:

    ConditionBehavior
    ANDThe merge node is marked Successful only if all upstream branch nodes have finished running and each meets its specified run status.
    ORThe merge node is marked Successful if all upstream nodes have finished running and at least one branch node meets its specified run status.

    Run statuses available for each branch node:

    StatusMeaning
    SuccessfulThe node ran successfully.
    FailedThe node failed to run.
    Branch Not RunThe node was not selected to run (dry-run state). It is considered to have run successfully, but its task was not executed. Applies only when the ancestor node is a branch node.
  4. In Result Settings, set the run status for the current node. The figure above shows an example configuration:

    • Branch 1 condition: Successful, Branch Not Run, or Failed — the condition is met as long as Branch 1 finishes running, regardless of outcome.

    • Branch 2 condition: Successful or Branch Not Run — Branch 2 must finish without failing.

    • Merge logic: AND.

    • Result: the merge node is marked Successful only if Branch 1 has finished running AND Branch 2 has finished running without failing.

    You cannot select a run status for the merge node itself. You can only set the run status to Successful.

    image

  5. In the right-side pane, click Scheduling Properties to configure the scheduling settings. For details, see Configure scheduling properties.

Step 2: Deploy the node and perform O&M

  1. Submit and publish the merge node to the production environment. For details, see Deploy a node or workflow.

  2. After publishing, the task runs periodically based on your scheduling configuration. Go to Operation Center > Node O&M > Auto Triggered Node O&M > Auto Triggered Nodes to view and manage the task. For details, see Get started with Operation Center.