Row splitter loop and excel writer node

Hi, I’m trying to split a k-means cluster which has 10 cluster in the first place and then divide it into 3 k-means cluster in loop node before writing each of the cluster results using excel writer node.
To summarize, this should give me 30 excel results file.
However, I find it very tiring to do it manually and I found about the loop node. Is there possible ways for me to use it using loop node? I have tried using the below loop but it just gave me a never ending loop. Is there something wrong?

image

Hi,

So you have 10 clusters before the loop. You can include the cluster column in the Group Loop Start node and then after dividing it into 3 more clusters use another Group Loop Start and a Excel Writer (XLS) node to write data and close the inner loop using a Variable Loop End and the outer loop by a Loop End.
Remember you have to assign unique file names by using flow variables.
You can read more about loops here.
You can read more about flow variables here.

Best,
Armin

Hi @armingrudd

Thanks for the response. I have followed your suggestion on this and I think I made some error although the nodes already run perfectly. Below is the snapshot of the nodes based on the input. I have include the 10 clusters before the loop and with the same approach of dividing cluster, I use k-means of 3 clusters to divide it inside the loop.

However, the results that I achieved only produced 1 cluster even though I already set the k-means of 3 numbers cluster. Have I made mistakes?

image

image

Take a look at this example workflow:

clusterInClusterWriteToExcel.knwf (117.6 KB)

Armin

3 Likes

Thanks for your help @armingrudd
it works perfectly!

1 Like

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