Using DB Transaction inside a loop

Hello everyone,

I recently wanted to implement a DB transaction node in one of our Knime Server workflows, which contains a “generic loop start” and “variable condition loop end” node.
Unfortunately the loop can’t resolve and I get the error message “Loop start and loop end are not in the same workflow”. Without the transaction, the loop works like intended.
I also build a new test workflow with inserts random rows to a table in a database in the loop with the same result but a slightly different error message “Encountered loop-end without compatible end!”. This also happens with other loop end nodes.

Is there any possibility / workaround to run a db transaction inside a loop?

Many thanks in advance,

Hi @schulz_d -

I have been looking into this, and have been able to recreate the issue - in particular the fact that the loop works OK when the Transaction nodes are removed. This seems strange to me but I am not a DB expert.

Let me check with our developers on this one - if we end up with a new bug ticket I will update here.

EDIT: Ticket created (AP-17228).


Hello @schulz_d,

we found that there is a problem of the loop end to find the corresponding loop start again. In such a case, it is useful to wrap the nodes into a component, which will make it easier for the algorithm to execute the loop.

Since this example uses an empty table as loop input the would create an endless loop. You can catch this by replacing it with a node, where you can simulate a nearly endless loop, by setting the loop count to a very high number.

Best regards,


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