ERROR Loop End: Loop Body wired incorrectly (Branches are not permitted to leave loops!).

Hello,

I am new to KNIME and I can’t find the problem with my feed.
I want to create a loop to combine the data contained in several files from a list of files into a single file.
I have tested several loop functions and the result is negative
Thank you in advance for your help
Sincerely

Hello @SimonDG

The error is being generated because of this branch I’ve enclosed in a red square. You see that it is being calculated outside the main body of the loop, and you are generating a path variable to your Excel Writer, which is totally correct.

You can connect that last String to Path node to the Cross Joiner, since it is a variable, it will be propagated downstream, so the Excel Writer can access it.

I cannot upload an example for you right now, but do let me know if that worked. Otherwise I will do a test and show it to you as soon as I am able.

Cheers,

2 Likes

Another option that should work is put the loop end after the writer node, connect the writer node flow variable output to the loop end flow variable input, then connect the chunk loop start table out directly to the loop end table input.

Thank you for your answer.

It works as follows.

Sincerely

2 Likes

Thank you,

That is perfect

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.