Window Loop Start control with Flow variables

Hi everyone, I am simply trying to loop through a timestamps (datetime) column with a window size and step size interactively choosen and fed to the window loop start node as a flow variable. I tried every possible way to make it work, but the node does not accept any form of flow variable input.

I tried every possible way to make it work, but the node does not accept any form of flow variable input.

The Window Loop Start node does indeed accept flow variable input. I just set one up.

Can you share what you’ve tried? Being more specific with the problem and sharing the workflow is the best and most efficient way of getting help.

3 Likes

The block does accept flow variable inputs.
image
The component I created simply let’s the user choose a period that will be used to extract rows at equally spaced timestamps. Since I need to try various periods, I wanted to choose it interactively and feed it to the window loop.
image
The block returns errors with any input, I’ve tried “10s”, 10s converted to duration with the dedicated node, so “PT10S”, I’ve tried choosing it in seconds.
Personally, I believe that even if it is possible, the node should be revised by knime since it is so hard to get right.

I’m afraid we need to see that part of the workflow in action. Just like @elsamuel I’m also unable to reproduce the issue. Both duration and seconds based seem to work fine.

Note that when you go for seconds, you only need the string equivalent of the actual value, without “s” suffix.

Var’s 6 and 7 are the timeStepSize and timeWindowSize
image

Thank you for the feedbacks.
I tried giving the input to a window size in seconds as 10 in string form:
image

The error I get is the following:

It’s like the variable is invisible to the node, and gets bypassed as soon as I provide also a value in the input field.

Make sure you have placeholder values in place in the main dialog before applying the flow variables.

1 Like

Here’s the example I used:
image

The first thing to be sure of is that you’re creating variables of the correct type.If I’m interested in using a Time-based window in seconds, then the variables must be integers:
image

The next thing to do is to ensure that the component output is configured to expose these variables:

Next, we configure the Loop node. Choose Time based, then choose the window unit and step size unit, then enter dummy values:

Now set up the Flow Variables for timeStepSize and timeWindowSize:

And you’re all set.

I can set up the variables:
image

and here’s the first loop execution:

and the second:

and the last:

5 Likes

Thank for your lengthy response. i did it like you and now it works. I’m not entirely sure what I was doing wrong, but nontheless I solved the issue. Cheers

1 Like

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