In one of my workflows I get a strange behavior using SplitInBatches. I need to use it in tandem with Microsoft SQL als stated in the docs.
Coming from the left, following the false branch of the IF node with the 235 items down to the next IF node. The true branch of the IF node titled “IF” is not taken (gray), yet the “SplitInBatches 1” starts doing work. It is not set to “Allways Output Data”. Neither are the IFs, SQL node.
I propably can mitigate the issue with some more IFs, but the behavior is just strange.
Is this a bug or is this some intended behavior?
It will be the merge node, You are telling it to merge the data from the true branch into the false branch but if there is no data it will never run so instead what it does is tries to go back as far as it can to produce a result.
The solution for this one would be to drop the Merge Node. If you do really need it then it would be a case of redoing the logic for that part of the workflow.
This makes perfect sense being because of the Merge node.
I rely on merge nodes often since, well, I need to merge the data from older Inputs with the flow data.
I’ll think about how to get around this. Usually I go with a function node to filter out empty items in the data.