This workflow demonstrates the usage of the 'Table Row to Variable Loop Start' node.
This is a companion discussion topic for the original entry at https://kni.me/w/g_W4wvGJ-PrikNkj
This workflow demonstrates the usage of the 'Table Row to Variable Loop Start' node.
quote=“DavisRogers, post:10, topic:14572”
I am down to another challenge that is popping out at me with Parameters.
I have a Form that produces a Orders Table.
I want to have the Orders Table provide the parameters using the Table Row to Variables Loop Start and Loop End.
The form will collect variables that will perform calculations to produce a Dataset. Each Row in the Table is to be a Parameter of 7 or more variables.
How does one set that up? I am looking at a example below that appears to have 1 parameter, but I need about 15.
knime://LOCAL/Example%20Workflows/workflow_SQL-group/12_Using_TableRows_as_FlowVariables_in_Loop
Davis
Hi,
The Table Row to Variables Loop Start node iterates over the rows in the input table one at at time. For each iteration, the Table Row to Variables Loop Start node generates as many flow variables as there are columns in the input table, and the names of these flow variables are the same as the column names. The values of the flow variables are the values in the row that is handled in the current iteration. In the loop body, you can perform calculations/transformations on these flow variable values. Please have a look at the workflow attached that demonstrates this.
I hope this answers your question. If not, keep asking!
Best,
Maarit
Using_TableRows_as_FlowVariables_in_Loop_demo.knwf (15.7 KB)
Awesome Maarit,
I am finding the node to be appropriate for this challenge, however, the following error is occorruing
WARN File Reader 2:292 Can’t access ‘file:/C:/Users/Johnny/knime-workspace/OTHER/KNIME_-SB_6-10–2019_0433PM/data/pro_New-Construction-Crawl-Brick.txt’. (C:\Users\Johnny\knime-workspace\OTHER\KNIME_-SB_6-10–2019_0433PM\data\pro_New-Construction-Crawl-Brick.txt (The system cannot find the path specified))
The node this is happening on is the “Rule Based row-filter” node.
The location on my local hard-rive is not file:/C:/Users/Johnny but file:/C:/Users/Davis.
How does this get changed to the proper path from on node? Please advise.
Davis
Hi Davis,
Could you send a screenshot of the workflow or the workflow file so that I can better understand which nodes you use and which node fails?
Is this user “Johnny” someone who built the workflow and shared it with you? If yes, then I recommend to access the file via a path that is independent of the file structure on the local system, i.e. a workflow-relative path.
Please let me know - I’m happy to help more!
Maarit
Hi Maarit,
Is this something we can do off public view? This is proprietary information that I would like to remain intellectual property? Please advise.
HI Davis,
Can you send me just a screenshot of your workflow? If I cannot solve the problem by looking at it, let’s try to find another solution then.
Maarit
Hi Davis,
I see that
A few comments/questions:
I attach a simple example of how to read multiple files using a loop. Maybe it helps you more.
Read_many_files.knwf (285.7 KB)
Best,
Maarit
OK, I am looking at the Read_many_files.knwf and see how this works. Thanks
Good day all! I need your help on this. I plan to create a loop that will iterate from column to column and then divide the values on that column to the value which matches values on second table with corresponding row.
Pls. help! Thanks in advance.
For ex. Row1 value under M-105(1st table) divided by value on column5(2nd table) on M-105row
For folks who stumble across this topic in the future, @ikesh 's question was answered in this thread: