Hi, I'm brand new to Node-Red, but so far I love it! I need to (repeatedly, but not super quickly) read a couple thousand database rows (Mongodb), calculate a bunch of attributes and then update the objects.
So far, I'm using:
- Mongodb find.forEach (mongodb3 node)
- running through a few function blocks to do the calculations and set attributes
- using batch/join to create json lists of modified objects so I can update in batches
- Mongdb bulkWrite with a updateOne row for each id in the list and update from the corresponding object in my list.
It kinda works, but the batch node assumes an endless flow so that's not good. If I end with a partial batch those rows are not processed.
How can I get the batch functionality so that ALL my rows are processed? Any other suggestions?