Database looping node

I encountered a weird behavior with the database looping node when the input list contains duplicates:

  • I have an entry list of 14 ids with 4 duplicates. These 4 duplicates are at the end of the list. The database query returns data for 3 of them, not for the last duplicate; I’m getting 13 rows instead of the 14 I am expecting.
  • When I sort my input list so that the duplicates are anywhere in the list but not in last position (same duplicates can be one after the other or not in this entry list), I am getting my 14 rows.
  • I found out that as soon as I have one of the duplicates in the last position of the entry list (the other ones being anywhere in the list), I will not get data for this last duplicate; I will get only 13 rows.

Thanks in advance for your answer,

I found Database looping logic strange ever and use Parameterized Database Query. also those nodes will be obsolete soon.

1 Like

Hi Claire,

in addition to what @izaychik63 mentioned I would add that Parameterized DB Query Reader node from new Database Framework is the replacement for the Database Looping node so I recommend to use that one. So far it is not planned to implement the Looping node in the new framework.

Additionally if you can share an example workflow (using sqlite database for example) or a bit detailed instruction how to reproduce the issue you are experiencing I would be grateful. I couldn’t do it myself.


Hi Ivan,
Thanks a lot for the information we will do that. Do you recommend we update our current workflows and replace the DBLooping node with the Parameterized DB Query Reader right now?
Unfortunately, I cannot share my workflow, just the 3 attached screen shots. The scope of this workflow is to add data read from an Excel file with information retrieved from our database for a list of compounds (structures as smiles, molecular weight etc…); these compounds are present in different containers this is why I may have the same one several times. As you will see by looking at the screen shots, before the DBLooping node, I have 14 rows. After the DBLooping node only 13 rows.
My incoming list contains duplicates in last rows of the table (rows 13 and 14). After, the db looping node, I am missing data for row 14.
I have made several tests:
-If I sort my input table so that my duplicates are not in the last rows of my input table (bottom rows), I got my 14 rows after the db node.
-If I filter data in my input table so that I have only 2 duplicates before the DB node, I got only one row after the db node.
Very strange…
Hope this helps,


Hi Claire,

Don’t see a need for it really. Especially if it is working just fine and suits your needs. The issue you reported will be checked and if bug should be fixed. What I do recommend is to start using new Database nodes for further development.

Tnx for the screen shots :wink:


Ok thanks for the feedback.

Hi Claire,

Database Looping node should receive distinct values from input table. This is stated in node description under Column selection part. So if I got you right you should use Parameterized Database Query node for your use case. If for some reason it won’t work come back and we will try to figure it out.

Regarding filtering only when duplicate is on last position. This is a bug in a way that it should filter out not only duplicate that is last on the list but also any other duplicate regardless of position.

Hope we cleared it now. Tnx for help!


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