Topic
4 replies Latest Post - ‏2014-01-28T20:33:16Z by user2034
SystemAdmin
SystemAdmin
435 Posts
ACCEPTED ANSWER

Pinned topic API for Modeler Streams?

‏2012-10-17T13:55:54Z |
Hello, I'm looking for a technical solution to open existing Modeler-streams (or Jobs and Nodes), get pieces of information about them and execute them using a programming language.
There is e.g. a well documented python API for the SPSS Statistics package, by which means you can start the spss-processor and run calculations just by running as python script.
I'd love to have the same functionality for the modeler.
There is already an existing Java-Api capable of extending the Modeler functionality, but I found no way to edit streams.

Thanks for any suggestions,
Stefan
Updated on 2012-11-06T22:05:37Z at 2012-11-06T22:05:37Z by SystemAdmin
  • TedFischer
    TedFischer
    246 Posts
    ACCEPTED ANSWER

    Re: API for Modeler Streams?

    ‏2012-10-17T14:05:54Z  in response to SystemAdmin
    Unfortunately, there is currently no way for an external programming language to call upon a Modeler stream. As you noted, the reverse is possible -- it is possible to have Modeler call upon external C or Java code.

    If you have a need to mix in a Modeler stream with other programming there is the following options

    1. Execute Modeler client via command line and tell it to run and execute a stream (see documentation for details). This will open Modeler client and run the stream
    2. If you have Modeler server , you can run a stream in background via Modeler batch.
    3. If you have IBM SPSS Collaboration and Deployment Services, you can what is called a general job step that runs some other type of program, then have a Modeler stream depend on the results of the general job step, then have another general job step depend on the results of the Modeler stream.

    Thanks.

    Ted
  • JDThorson
    JDThorson
    1 Post
    ACCEPTED ANSWER

    Re: API for Modeler Streams?

    ‏2012-11-06T15:49:51Z  in response to SystemAdmin
    Execution - SPSS Solution Publisher is the API level interface for executing published Modeler stream branches (PIM and PAR files generated by the 'publish' action). This is a C++ level interface and this product is shipped and licensed by IBM SPSS Collaboration and Deployment Sevices under the 'real-time scoring' license agreement.

    Inspection - Starting in SPSS Solution Publisher 15.0 and later releases the stream inspection and publish automation interface Predictive Servies API (PSAPI) is also shipped, this is a Java API.

    Both APIs are thought to be in the experts domain and as such there is a learning curve.

    You may also execute a Modeler stream in a 'Job' in SPSS Collaboration and Deployment services using their services or via a JMS message but you can't inspect the Modeler stream using these services.
  • SystemAdmin
    SystemAdmin
    435 Posts
    ACCEPTED ANSWER

    Re: API for Modeler Streams?

    ‏2012-11-06T22:05:37Z  in response to SystemAdmin
    SPSS Modeler has an internal scripting language called CLEM. You can invoke a script from the command line or within a stream. The scripting language is somewhat limited but does make many tasks (e.g. executing parts of a stream, PMML import/export, model import/export, etc.) extremely simple. There is some ability to work across streams. Search Google for "SPSS Modeler Scripting 15" for the PDF docs.
    • user2034
      user2034
      1 Post
      ACCEPTED ANSWER

      Re: API for Modeler Streams?

      ‏2014-01-28T20:33:16Z  in response to SystemAdmin

      I have created a model in SPSS modeler 15.0. Now,  I want to edit the stream input and execute the modeler stream using JAVA through Netbeans. I already read the above comments, I dont have SPSS solution publisher license. Is there any other way to do this?