Help Fixing Variable Loop, Table Row to Variable

In the attached excel file there is a column, “Neighborhood”, with 86 different names. Each neighborhood has pre-required date ranges by year and month via rows.

temp.xlsx (1.4 MB)

I am trying to use each neighborhood as a variable to complete the remaining steps via a Loop with a final output for each neighborhood, year, and month. The remaining steps are using Linear Interpolation via the Missing Value node to fill in missing neighborhood data at the Year and Month pre-required time frames.

When I use the Nominal Value Row Filter and run a single neighborhood manually, this workflow works fine. But when I try to automate each neighborhood as a variable, the workflow binds up for hours with no end. All nodes before the Joiner Node with the “!” finish. The Joiner node with “!” never leaves “99%”, and the remaining nodes stay “cued”.


I’ve never been successful at introducing variables into loops to work for me. But I need to grow up and make this work for 86 neighborhoods, as this is just too much to deal with manually, one-at-a-time.

I am using version 4.7.7 here. I do have the 5.1 series installed also, but step one of my million step workflow uses the KNIME Read From KML node, not available in later KNIME versions.

temp.knwf (66.2 KB)

Please tell where I am screwing up, so I can grow up and learn to use variables and loops. The excel data and workflow are attached. Thanks!

Hi @creedssmith

I might be understanding you wrong but this should get you sorted out:

If I understand it correctly you want to replace the missing values per neighborhood with the linear interpolation.

What you try to achieve in your current workflow is something that the Group Loop Start node does automatically for you. All rows which have a common value in the columns you define as to be Included are considered to be one group. In your case, that’s the column neighborhood.

The node will iterate through all groups it finds automatically. Below is an example of one iteration, all records for Eastridge, Crosspointe, Crosspoint, Highlands Ranch CO

Because of this, you only need one Missing Value node which you can populate with all the columns you would like to supplement with the linear interpolation.

Below are your before and after of one neighborhood.


After:

It’s light work for KNIME to perform this, it takes about 5 seconds to process the entire file. No flow variables are required here. In case you want to perform some other actions, a nice feature of the Group Loop that it also automatically stores the group that it’s currently processing as a variable.

Hope this helps!

4 Likes

Hi @creedssmith, as @ArjenEX explained, you don’t need variables for that, because group loop and Missing Value node can handle all your needs

image
Try this workflow and thanks for @ArjenEX explanation

Neighborhood_loop.knwf (1.5 MB)

Br

4 Likes

@ArjenEX @hmfa AH!, so I made it a more complex workflow than I needed :frowning:

Let me clean up my mess and try your simple solution. I guess I am not grasping how best to use variables and need to find a clean video presentation on the subject.

Thanks for your feedback!

Hi @creedssmith

Take a look at this one.
Maybe it can inspire you.

Br

1 Like

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