LAST UPDATED: JUNE 23, 2025
The Merge task’s groupBy: "Task"
configuration enables merging by including only execution lineages containing the task node with the specified display name. Every execution lineage permutation containing that node, leading to the Merge task, will appear as a separate object in the final merge array.
Unlike grouping by "Path" and grouping by "Task Instance" , a Merge task that groups by "Task" will only have one execution instance with a Raw Data tab containing the merge result array.
To apply this configuration, the merge condition must include at least the following two keys:
JSON
{
"groupBy": "Task",
"taskName": "<Display name of a task node>"
}
Core Concepts Example 1 - Lineage Capture on Task Match
OBJECTIVE – Illustrate that the Merge task filters for and includes only the upstream lineage that contains the specified task.
Build the following playbook:
Input the following merge condition :
JSON
{
"groupBy": "Task",
"taskName": "A"
}
Test run the playbook.
Click on the icon within the Merge task.
Observe the execution results for the Merge task in the Raw Data tab.
MERGE RESULT
JSON
[
{
"DataSource": { ... },
"A": { ... }
}
]
Stop the test, then repeat steps 2-5, substituting "B" as the value for the taskName field in the merge condition.
JSON
{
"groupBy": "Task",
"taskName": "B"
}
MERGE RESULT
JSON
[
{
"DataSource": { ... },
"B": { ... }
}
]
Stop the test, then repeat steps 2-5, substituting "C" as the value for the taskName field in the merge condition.
JSON
{
"groupBy": "Task",
"taskName": "C"
}
MERGE RESULT
JSON
[
{
"DataSource": { ... },
"C": { ... }
}
]
TAKEAWAY
The Merge task filters for and includes only the upstream lineage that contains the specified task.
Example 2 - Merge Results for Playbooks with Common Ancestor Nodes and Sibling Branches
OBJECTIVE – Learn how the specified task name affects merge results when parallel branches share a common ancestor node.
Build the following playbook:
Input the following merge condition :
JSON
{
"groupBy": "Task",
"taskName": "A"
}
Test run the playbook.
Click on the icon within the Merge task.
Observe the execution results for the Merge task in the Raw Data tab. MERGE RESULT
JSON
[
{
"DataSource": { ... },
"A": { ... },
"A2.1": { ... },
"Merge": { ... }
},
{
"DataSource": { ... },
"A": { ... },
"A2.2": { ... }
}
]
Stop the test, then repeat steps 2-5, substituting "A2.1" as the value for the taskName field in the merge condition.MERGE RESULT
JSON
[
{
"DataSource": { ... },
"A": { ... },
"A2.1": { ... }
}
]
Stop the test, then repeat steps 2-5, substituting "A2.2" as the value for the taskName field in the merge condition.MERGE RESULT
JSON
[
{
"DataSource": { ... },
"A": { ... },
"A2.2": { ... }
}
]
TAKEAWAYS
When the taskName key matches a task that splits into parallel branches, the Merge task includes a lineage object for each resulting branch.
When the taskName key matches a task within a single sibling branch, the Merge task excludes nodes from the other sibling branch.
Example 3 - The Impact of Unwind Task on Merge Results
OBJECTIVE – Learn that each completed execution lineage leading to the Merge task produces a separate lineage object in its array output.
Build the following playbook:
Input the following JSON data for the Unwind A task:
JSON
[
{ "id": 1, "name": "Object 1"},
{ "id": 2, "name": "Object 2" },
{ "id": 3, "name": "Object 3" },
{ "id": 4, "name": "Object 4" }
]
Input the following JSON data for the Unwind B task:
JSON
[
{ "id": 5, "name": "Object 5" },
{ "id": 6, "name": "Object 6" },
{ "id": 7, "name": "Object 7" },
{ "id": 8, "name": "Object 8" }
]
Input the following merge condition :
JSON
{
"groupBy": "Task",
"taskName": "Unwind A"
}
Test run the playbook.
Click on the icon within the Merge task.
MERGE RESULT
JSON
[
{
"DataSource": { ... },
"Unwind A": { ... },
"AB": { ... },
"Merge": { ... }
},
{
"DataSource": { ... },
"Unwind A": { ... },
"AB": { ... },
"Merge": { ... }
},
{
"DataSource": { ... },
"Unwind A": { ... },
"AB": { ... },
"Merge": { ... }
},
{
"DataSource": { ... },
"Unwind A": { ... },
"AB": { ... }
}
]
Stop the test, then repeat steps 4-6, substituting "Unwind B" as the value for the taskName field in the merge condition.
JSON
{
"groupBy": "Task",
"taskName": "Unwind B"
}
MERGE RESULT
JSON
[
{
"DataSource": { ... },
"Unwind B": { ... },
"AB": { ... }
},
{
"DataSource": { ... },
"Unwind B": { ... },
"AB": { ... }
},
{
"DataSource": { ... },
"Unwind B": { ... },
"AB": { ... }
},
{
"DataSource": { ... },
"Unwind B": { ... },
"AB": { ... }
}
]
Stop the test, then repeat steps 4-6, substituting "Unwind B" as the value for the taskName field in the merge condition.
JSON
{
"groupBy": "Task",
"taskName": "AB"
}
MERGE RESULT
JSON
[
{
"DataSource": { ... },
"Unwind A": { ... },
"AB": { ... },
"Merge": { ... }
},
{
"DataSource": { ... },
"Unwind A": { ... },
"AB": { ... },
"Merge": { ... }
},
{
"DataSource": { ... },
"Unwind A": { ... },
"AB": { ... },
"Merge": { ... }
},
{
"DataSource": { ... },
"Unwind B": { ... },
"AB": { ... },
"Merge": { ... }
},
{
"DataSource": { ... },
"Unwind B": { ... },
"AB": { ... },
"Merge": { ... }
},
{
"DataSource": { ... },
"Unwind B": { ... },
"AB": { ... },
"Merge": { ... }
},
{
"DataSource": { ... },
"Unwind B": { ... },
"AB": { ... },
"Merge": { ... }
},
{
"DataSource": { ... },
"Unwind A": { ... },
"AB": { ... }
}
]
TAKEAWAYS
Each completed execution lineage upstream of the Merge task that includes the specified task in the merge condition generates an additional object in the final merge array.
If the task specified in the merge condition is an Unwind task, the number of objects in the final merge array—unless limited by the "count " merge condition key—will equal the number of top-level objects elements deconstructed by the Unwind task .