I am after a solution to create replicate rows in KNIME where the number of replicate rows is given by a column value. Suppose I have the following table:
col1 col2 col3 col4
A B C 3
...
I would like to replicate each row x times according to col4 (in this case 3 times). So the resulting table would like like this:
Hello @marco_ghislanzoni,
The workflow has been realy helpful. I am also trying to achieve the same results.
But in a row the iteration count value is 0. The counting loop stops there and throws an error message
" cannot loop fewer than once"
and doesn’t iterate to the next row.
Can you help me with this
[ example dataset:
Hello @ScottF,
Thanks for the Idea.
And I have a column for month in here.So if the the iteration count in 5, i want to get the following 5 months in the output. If its 24, i want to get next 24 months in the output column.
can you help me with that.
Example snapshot for required output if the count =4
Hello @ScottF,
Thanks for the solution.
I need to produce the following months . If i running the WF today, the next rows have the values
May
June
July
So it the month value should start from the present the and following number of months should be based on the count
In that case, you probably just need a flow variable corresponding to the current month, which you can then pass into the Counter Generation node as a starting point.
Such a flow variable could be generated using the Date&Time Input node to get the current date, and then parsing out the month.