Filter row by following order with loop

Hi all,

I need your help, maybe it’s easy, I’m beginner and I’m still learning. I want to resolve this problem by using a loop.

Below my data:

Specific Problem Sites Cease_Date Event_Date GroupID2
Loss of Mains 125 2023-08-30 11:38:08 2023-08-30 00:42:24 0
Battery Discharging 125 2023-08-30 11:38:08 2023-08-30 00:43:22 1
Battery Disconnect 125 2023-08-30 11:38:08 2023-08-30 01:14:41 2
Loss of Mains 125 2023-08-31 09:59:52 2023-08-30 13:11:27 0
Battery Discharging 125 2023-08-31 09:45:47 2023-08-30 13:12:24 1
Battery Disconnect 125 2023-08-31 09:45:47 2023-08-30 13:33:36 2
Battery Discharging 125 2023-08-31 09:59:52 2023-08-31 09:44:06 1
Battery Disconnect 125 2023-08-31 09:59:52 2023-08-31 09:48:22 2
Loss of Mains 125 2023-09-19 13:42:12 2023-09-19 13:41:59 0

The order must be 0,1,2, if it doesn’t follow, I don’t want it. I have group by three rows, with a chunk loop start. But after I don’t know how to proceed.

I have already group by a group loop by sites.

Any suggestion?

Thank you in advance.

hi @stef_pf
not sure if this meets your expectations, but i’ve filtered out the ‘chunk group’ that doesn’t follow the sequence, based on your requirements.
image
KNIME_order-MM.knwf (123.9 KB)
rgds
linux knime 5.1.x

2 Likes

Hi @stef_pf

Another approach without using a loop filter_chunks_of_rows_by_row_order.knwf (26.3 KB)


gr. Hans

5 Likes

@HansS , your workflow approach is outstanding … simplified, optimized, and more efficient to execute. @stef_pf , i highly recommend trying Hans’s approach to achieve a fast and optimized workflow. in my opinion, it is the best solution for your challenges.

rgds

2 Likes

Hi,

Thank you, the community is very reactive.

Best Regards.

Hi,
We took a different approach, using lots of nodes, with no results.
And here, in just four nodes, the result is there, thank you.
Best Regards.

2 Likes

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