View the javascript table view for each iteration of the loop

Hello,
I would like to view the javascript table view for each iteration, I don’t want to see it only at the end with the last iteration.
So, the table view must be open and updated each iteration every 10 seconds (as i configured the wait node).
Thank you in advance for your ideas to solve it!

realtime_data2.knwf (91.8 KB)
This is the workflow if someone is interested

Hey there,

I can’t provide a prototype right now, but the only way I managed to make something like you want work is by keeping the Loop “outside” the component".

I.e. outside the component you have table creator and loop start that pass data inside the component that contains your processing logic and the table view and passes data to component output.

Outside you then have your loop end.

You can then Open the view of your component and after it is open you start the loop… that should then refresh with every iteration.

Thank you!
I tried your idea but it keeps showing only the last iteration.


realtime_data2.knwf (92.3 KB)
this is the flow with your suggests

Hi @JoselynNieto , I have something which may (or may not) assist! I know it isn’t quite what you are after.

This is different to the idea from @MartinDDDD , in that it doesn’t use the table view of the component, but instead this uses a component I have been toying with recently for the purposes of inspecting data in regular loops to see what is being collected as it progresses. It uses an H2 database to collect the results of each iteration, and if the workflow is coded in the right way, you can then use a DB Query Reader connected upstream to the H2 Connector, to collect the “downstream” results which means you can keep refreshing it :slight_smile:

Outside of your component, a connection can be made to the H2 Connector, with a loop as shown here:

You could feed the session connector from the H2 Connector into your component, but for expediency, I have just put another H2 Connector configured to talk to the same H2 database and attached the Iteration Collector:

Ok, so it’s not giving you access to the internal view from the component, but it is giving you a spyglass on the data it has processed on each iteration, and may at least let you see the progress!

realtime_data with iteration collector and loop.knwf (279.5 KB)

Here is a video demo of it executing

2 Likes

@JoselynNieto what I can offer is an approach to click thru a list of values and the view in the component will change accordingly. But it is a manual process:

I also toyed around with a loop and a Breakpoint where I can configure if I start the process and then use a wait button but the View will not show up.

The construction is a little bit complicated. The Breakpoint can be configured in the settings of the Data App so it will not start immediately but wait until the configuration is changed in the app itself. Maybe this approach can be used for another scenario. Maybe a Diashow or something.

4 Likes

I recall having seen this error every now and then as well - I guess it may be due to KNIME not being build for this.

I see you have had a lot of help already, but wanted to close the loop with the set up I had in mind and that worked for me.

I have built up a very quick prototype where inside a loop random numbers are generated, joined and then displayed in the view:

If you execute the Table View once (before starting the loop) and after that you start via the loop end node, the view refreshes every couple of seconds.

It is important that the wait node is at the end of the loop rather at the beginning because otherwise straight after your view is loaded the next iteration starts which then resets your view… Here’s a demo:

Here’s the WF

loopviewaview.knwf (86.3 KB)

@mlauber71
Will definitely check out your back / next WF… have tried to make that work unsuccessfuly a few times so great to see someone having “cracked that nut” :slight_smile:

4 Likes

Thank you to @mlauber71, @MartinDDDD, and @takbb! The solution provided by @takbb is the closest to what I’m aiming for, but it’s still a bit challenging because I don’t want to save the data (perfomance reasons) or execute the flow in multiple steps. Ideally, I’m looking for a solution that I can run in a single step within a component and view the data dynamically with each iteration. I dont know if it is possible with Knime!

1 Like