cancel
Showing results for 
Search instead for 
Did you mean: 

Join Snap issue

ash42
New Contributor III

I have output documents from join snap as follows
image

next I have a Router Configured basically for checking for a particular variable “RowCount” in input…the scenario is I only want to check if “rowCount” is available in only 1 input document,but it right now it is checking the variable for each input document

image

here is my pipeline , I want the Archive Files child pipeline to be called multiple times for the input documents,but at the same time I want it to happen only if Rowcount variable is available in the input(hence router is placed)

image

I want all the input files to be processed, if the Rowcount variable is available in the flow

1 ACCEPTED SOLUTION

AleksandarAngel
Contributor III

Hi @ash42,

You can achieve that by following these steps:

1.Use Gate Snap to group all of the input documents in a single array.
2.Use filter function to filter that array using .hasPath("RowCounts") expression. So if we have an input document that has RowCounts property the length of the array will be greater than zero.
image
3.Use a Router to route according to has_rowcount property.
image
4.Then just use JSON Splitter to split the documents that should be processed by Archive files pipeline. Or use Exit Snap accordingly.

The flow should look like:
image

Here is the sample pipeline:
SL-comm-route-by-row_2023_02_18.slp (11.8 KB)

Let me know if this helps you.

BR,
Aleksandar.

View solution in original post

1 REPLY 1

AleksandarAngel
Contributor III

Hi @ash42,

You can achieve that by following these steps:

1.Use Gate Snap to group all of the input documents in a single array.
2.Use filter function to filter that array using .hasPath("RowCounts") expression. So if we have an input document that has RowCounts property the length of the array will be greater than zero.
image
3.Use a Router to route according to has_rowcount property.
image
4.Then just use JSON Splitter to split the documents that should be processed by Archive files pipeline. Or use Exit Snap accordingly.

The flow should look like:
image

Here is the sample pipeline:
SL-comm-route-by-row_2023_02_18.slp (11.8 KB)

Let me know if this helps you.

BR,
Aleksandar.