spssspss-modeler

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.

enter image description here

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!


Solution

  • In order to automatize, I suggest to try to use global nodes combined with clem scripts inside the execution (default script). I have a stream that calculates the first date and the last date and those variables are used to rename files at the end of execution. I think you could use something similar as explained here:

    1) Create derive nodes to bring the unit values used in the weekly stream

    2) Save this information in a table named 'count_variable'

    3) Use a Global node named Global with a query similar to this: @GLOBAL_MAX(variable created in (2)) (only to record the number of variables. The step 2 created a table with only 1 values, so the GLOBAL_MAX will only bring the number of variables).

    4) The query inside the execution tab will be similar to this:


    execute count_variable

    var tabledata

    var fn

    set tabledata = count_variable.output

    set count_variable = value tabledata at 1 1

    execute Global


    5) You now can use the information of variables just using the already creatde "count_variable"

    It's not easy to explain just by typing, but I hope to have been helpful. Please mark as +1 in this answer if it was relevant one.