Question about SPSS modeler (There is an obstacle for make the stream run automatically)

I have SPSSmodeler stream which is now used and updated every week constantly to generate a certain dataset. A raw data for this stream is also renewed on a weekly basis.

In part of this stream, there is a chunk of nodes that were necessary to modify and update manually every week, and the sequence of this part is below: Type Node => Restructure Node => Aggregate Node

To simplify the explanation of those nodes' role, I drew an image of them as bellow.

Because the original raw data is changed weekly basis, the range of Unit value above is always varied, sometimes more than 6 (maybe 100) others less than 6 (maybe 3). That is why somebody has to modify there and update those chunk of nodes on a weekly basis until now. *Unit value has a certain limitation (300 for now)

However, now we are aiming to run this stream automatically without touching any human operations on it that we need to customize there to work perfectly, automatically. Please help and will appreciate your efforts, thanks!

If this was a modeler problem, you'll need a method to capture all the fields you want each time you want to execute your stream. Thankfully, this can be done with python. One would need to use a new aggregate node (that lists your Unit field as the Key Field and is the only output) and then attach a new table node to get a list of your desired fields. Python could then read the output from the table to feed your field list into your current restructure node.