This operator defines a window based on the time.

Parameter

Example

//sliding time window (notice: size and advance is directly based on the used timestamps. 
//if they are in milliseconds (which is default), size and advance are in milliseconds too.
 output = TIMEWINDOW({
                  size = 5, 
                  advance = 1, 
                 }, input)
 
//sliding time window with another time unit for size. 
//size  is converted from seconds into milliseconds 
// (since this is the default  time granularity). 
// This means, size will be 5000 and advance will be 1
 output = TIME WINDOW({
                  size = [5, 'SECONDS'], 
                  advance = 1, 
                 }, input)
 
//sliding time window with another time unit for size and advance. 
//size  and advance are converted from seconds into milliseconds 
//(since this is  the default time granularity). 
// This means, size will be 5000 and  advance will be 1000
 output = TIMEWINDOW({
                  size = [5, 'SECONDS'], 
                  advance = [1, 'SECONDS'], 
                 }, input)

 //sliding delta window, reduces time granularity to value of slide
 output = TIMEWINDOW({
                  size = 5, 
                  slide = 5
                 }, input)