It appeared that the KEY was a grouping so that A-G were in one KEY group and H-M were in another.
Therefore my understanding is that the date matching was to only occur within those groups.
The process in my head was more straightforward than my resultant workflow:
1. Group each of the rows by KEY (e.g. XXX_YYY_ZZZ and DDD_XXX_RRR) and for each of those find the current minimum date.
2. Mark the row that was the minimum date in each case as “START” to show it was the START of a 65 day period
3. Within each group, then join all the other rows to this START row and compare dates. Any rows that were within 65 days of the START should be marked as “DESELECT”.
4. Collect all rows that are either START or DESELECT and remove them from the input data stream.
5. The new input stream for the next iteration consists of all remaining rows.
6. Return to step 1 and repeat process until there are no rows remaining that are not either START or DESELECT
7. On completion of the loop, all START rows are marked as”1” and all DESELECT rows are marked as “0”
Dry running that process:
Iterations
1 START: A, H DESELECT: B, I
2 START: C, J DESELECT: D, K
3 START: E, L DESELECT: F,G
4 START: M DESELECT: N
That felt relatively straightforward. Then I attempted a workflow….
To use this workflow in KNIME, download it from the below URL and open it in KNIME:
Download WorkflowDeploy, schedule, execute, and monitor your KNIME workflows locally, in the cloud or on-premises – with our brand new NodePit Runner.
Try NodePit Runner!Do you have feedback, questions, comments about NodePit, want to support this platform, or want your own nodes or workflows listed here as well? Do you think, the search results could be improved or something is missing? Then please get in touch! Alternatively, you can send us an email to mail@nodepit.com.
Please note that this is only about NodePit. We do not provide general support for KNIME — please use the KNIME forums instead.