Merging Rows with a gap of max. 1min in the timestamp

Our production machine does a final test of every assembled product. It tests a lot of features and attributes with different but unique ID’s. Unfortunately the machine writes the results of in groups to the database. Therefore I have two datasets for one test, but it is within a gap of max. 1min.

If there is a recurring test necessary it takes minutes for the new datasets.

For Example:

Time | ID | Feature 1 | Feature 2 | Feature 3 | Feature 4 | Feature 5
7:03:18 | 1 | ? | ? | 0 | 1 | 0
7:03:32 | 1 | 1 | 0 | ? | ? | ?

How can I combine these datasets? Time should be the last timestamp. If it is from the same test, there is no intersection with the features.

Thanks for your help to a knime rookie. :wink:


Hi @mabm,
How long are the pauses between the datasets? If they are larger than 2 minutes you should be able to find a grouping criterion by stripping the seconds from your time stamp and rounding the minute down to next even number, e.g. with a Math Formula node with the formula abs(ceil(($Minutes$-1)/2)*2).
Then you should be able to group the rows via the GroupBy node with Maximum as aggregation method.

1 Like

Hi @gab1one

Thanks a lot for your suggestions. Result looks good. :+1:


1 Like