using loop iteration count for rule condition

Good day KNIME experts.

This is in relation to my migration workflow where i use list of table names to be read and tested (perform insert node). I use extract table dimension node to get the total rows of the table list. Since it perform insert operation (there is a possibility of failure), i need to compare currentIteration +1 vs number rows flow variables. The problem here is if the last table name has a problem on the insert node, compare condition fails (since currentIteration increments on the loop back operation).

What node or operation should i use in order to get the correct loop count including interrupted scenario (no incremental action if error/problem occurs)?

Hello @csarsonas,

KNIME Development category is mostly related to implementing your own KNIME nodes while KNIME Analytics Platform category (to which your topics are changed) is intended for general questions around KNIME and KNIME workflow creation/development such as yours.

But what action should you take after comparison? You don’t need to use currentIteration flow variable for comparison rather create your own which you’ll increase by one if there’s no failure in that iteration.

If I understand properly what are you doing your approach might not be the right one. From my experience if something went wrong with inserting data to database simply re-running insert operation right away will result in same error (unless connection/network is behind an issue). Probably you’ll need to take some action (clean your data a bit more) before trying to insert data again.

Br,
Ivan

1 Like

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