Error in windowing a date column

Hi to everyone!

I’m writing because I have some problem in using Window loop node.

I have a table with some information.
Information are placed in a calendar table with more than one row per day: there is the column of day, the column of the time, and the column of time bands.

So, for example, if the time band describe a range of 10 minutes, there will be 144 time bands per day.
In according with the DST (because I need a local date time calendar), there are 2 days in an year in which the number of time bands is different: during March (for Italy) there is a day composed by 23 hours (for example, 138 time bands); during October there is a day composed by 25 hours.

According to this argumentation, I cannot windowing the table using a fix number (for example the nr of the time bands in a day, because is variable), so I decided to use a window loop node time based.

Here are the problems:

  1. the window of 1 day on date column filters 2 days (instead of one!);
  2. the window of 24 hours on date&time column takes the first time band of the next day, the window on 23 hours on date&time column filters till the 11:00 PM;
  3. the window of 1440 minutes on date&time column works as the one of 24 hours;
  4. the window of 1439 minutes on date&time column works (!!!) BUT, obviously, the loop gives an error processing the october’s day with 25 hours (not in ascending order, for knime, because there are two times the 02:00-02:59 AM range).

I’m using the first one solution, filtering on the first day of the window (I use the date&time based row filter), but I lose the last day of the table.

I feel very frustrated.
I hope some one could help me with a better solution, thanks!


Hi Andrea!

Sry for a late response.

I did a bit of testing and couldn’t reproduce the first one where window of 1 day filters out 2 days. Can you send me an example how did you get it or you can check my workflow and modify it in order to achieve the same and send it back to me? Whether I used 1 day, 24 hours or 1440 minutes for window I got same result each time. What seems to be the problem is boundaries where second boundary is included. Mathematically speaking the boundaries are [time start, time start + window] while they are maybe supposed to be [time start, time start + window>. In latter case the first time band of the next day wouldn’t be taken into consideration.

Regarding your use case. You are using Window Loop Start node cause you perform some calculations for data within day so you would like for window size to be 1 day and step size 1 day as well? If so workaround is possible using Group Loop Start node with some Date&Time extracting before. Let me know if this is the case and I can make you an example if necessary.

2019_04_05_Window_Loop.knwf (20.8 KB)

Have a nice day,