How run a SPSS Modeler stream from Tm1 process

Post Reply
Palczan
Posts: 10
Joined: Tue Apr 14, 2020 8:57 am
OLAP Product: TM1 Cognos
Version: 11.3.0.27
Excel Version: Office 365 MSO 64bit

How run a SPSS Modeler stream from Tm1 process

Post by Palczan » Thu Jun 18, 2020 12:30 pm

Hello,
i have a problem with connection between TM1 and SPSS. I created a stream in SPSS Modeler and inside i import a TM1 Data, do a predict analysis and finally i export a data to TM1.
When i would like to run this stream from TM1 process. I can't do it. Do you have a ideas about it?

Emixam
Posts: 63
Joined: Tue May 21, 2019 3:33 pm
OLAP Product: TM1
Version: PA 2.0.x
Excel Version: 2016
Location: North America

Re: How run a SPSS Modeler stream from Tm1 process

Post by Emixam » Thu Jun 18, 2020 1:32 pm

Hi,

First I suggest you to take a look at this documentation.

Second, if you are looking for example of TI to send data in SPSS or vice-versa, you should look at the famous TM1 sample called 24retail. Usually you'll find that sample in: TM1_installation_location\samples\tm1\24Retail

Finally, if you want to run the SPSS model through TM1 (actually it will be a .BAT command), you should take a look at the TI called run spss prediction in that same directory.

Enjoy !
Sorry for my English :)

User avatar
Elessar
Community Contributor
Posts: 194
Joined: Mon Nov 21, 2011 12:33 pm
OLAP Product: PA 2
Version: 2.0.9
Excel Version: 2016
Location: Russia

Re: How run a SPSS Modeler stream from Tm1 process

Post by Elessar » Thu Jun 18, 2020 4:06 pm

Hi,

As an addition: refer to this documentation to create the bat/cmd file: https://www.ibm.com/support/knowledgece ... rence.html
Best regards, Alexander Dvoynev

Palczan
Posts: 10
Joined: Tue Apr 14, 2020 8:57 am
OLAP Product: TM1 Cognos
Version: 11.3.0.27
Excel Version: Office 365 MSO 64bit

Re: How run a SPSS Modeler stream from Tm1 process

Post by Palczan » Mon Jun 22, 2020 6:28 am

Thanks for your answer.
I read this documentation and saw complete models but I have problem with batch file. When I want run Batch I have a problem with login to Tm1 Import. I write a parameters into file but i don't know why doesn't worth.Bellow I add this statement:

clemb -execute -stream "E:\SPSS TM1 Demo.str" -P:tm1import.pm_host="http://152.14.44.2:5895/pmhub/pm"
-P:tm1import.tm1_connection={\"POC Server\",\"\",\"login\",\"password\"}
-P:tm1import.selected_view={\"Sales History\",\"_Import to SPSS Modeler\"}

Anybody, can help me?

Best regards
Palczan

User avatar
Elessar
Community Contributor
Posts: 194
Joined: Mon Nov 21, 2011 12:33 pm
OLAP Product: PA 2
Version: 2.0.9
Excel Version: 2016
Location: Russia

Re: How run a SPSS Modeler stream from Tm1 process

Post by Elessar » Mon Jun 22, 2020 7:11 am

  1. Which IntegratedSecurityMode do you use? If 5, try with 1
  2. Do you have SPSS Modeler Server installed? You can store credentials there
Best regards, Alexander Dvoynev

Palczan
Posts: 10
Joined: Tue Apr 14, 2020 8:57 am
OLAP Product: TM1 Cognos
Version: 11.3.0.27
Excel Version: Office 365 MSO 64bit

Re: How run a SPSS Modeler stream from Tm1 process

Post by Palczan » Mon Jun 22, 2020 8:48 am

1. I set a IntegratedSecurityMode = 1
2. i have only SPSS Modeler 18.2.1

User avatar
Elessar
Community Contributor
Posts: 194
Joined: Mon Nov 21, 2011 12:33 pm
OLAP Product: PA 2
Version: 2.0.9
Excel Version: 2016
Location: Russia

Re: How run a SPSS Modeler stream from Tm1 process

Post by Elessar » Mon Jun 22, 2020 10:37 am

I really didn't work closely with clemb arguments :)

Try to add this script in the Stream (Tools, Stream Properties, Execution) and execute just "clemb -execute -stream "E:\SPSS TM1 Demo.str""

Code: Select all

stream = modeler.script.stream();
node = stream.findByID("Id_of_your_TM1_Source_Node");
node.setPropertyValue("pm_host", "http://local:9510/pmhub/pm");
node.setPropertyValue("tm1_connection",
["Planning Sample","","admin","apple"]);
node.setPropertyValue("selected_view", ["plan_BudgetPlanLineItem", "SPSS_EXPORT"]);
stream.execute();
BTW, does you TM1(PA) version still have PMhub?
Best regards, Alexander Dvoynev

Palczan
Posts: 10
Joined: Tue Apr 14, 2020 8:57 am
OLAP Product: TM1 Cognos
Version: 11.3.0.27
Excel Version: Office 365 MSO 64bit

Re: How run a SPSS Modeler stream from Tm1 process

Post by Palczan » Mon Jun 22, 2020 11:05 am

Thank for your answer.
1) I checked your solution and i have one error. SPSS shows me a statement: "NoneType" has no attribute 'setPropertyValue'.

2)My version TM1 Still have PMhub.

Best regards
Palczan

User avatar
Elessar
Community Contributor
Posts: 194
Joined: Mon Nov 21, 2011 12:33 pm
OLAP Product: PA 2
Version: 2.0.9
Excel Version: 2016
Location: Russia

Re: How run a SPSS Modeler stream from Tm1 process

Post by Elessar » Mon Jun 22, 2020 11:14 am

I've found error in your command line: "tm1import" works only with SPSS versions <=17 (and my script also ;) )

You need to use tm1odataimport: https://www.ibm.com/support/knowledgece ... slots.html
Best regards, Alexander Dvoynev

Palczan
Posts: 10
Joined: Tue Apr 14, 2020 8:57 am
OLAP Product: TM1 Cognos
Version: 11.3.0.27
Excel Version: Office 365 MSO 64bit

Re: How run a SPSS Modeler stream from Tm1 process

Post by Palczan » Tue Jun 23, 2020 8:15 am

Okey,
Thanks for your answer. Now i create a execution but i have a problem with parameter. When I want to add input_credential I must entry a domain, user name and password. Do you know where can I check a domain parameter

Best regards
Kamil

User avatar
Elessar
Community Contributor
Posts: 194
Joined: Mon Nov 21, 2011 12:33 pm
OLAP Product: PA 2
Version: 2.0.9
Excel Version: 2016
Location: Russia

Re: How run a SPSS Modeler stream from Tm1 process

Post by Elessar » Tue Jun 23, 2020 8:24 am

Domain is for CAM security. You do not need it with ISM=1
Best regards, Alexander Dvoynev

Palczan
Posts: 10
Joined: Tue Apr 14, 2020 8:57 am
OLAP Product: TM1 Cognos
Version: 11.3.0.27
Excel Version: Office 365 MSO 64bit

Re: How run a SPSS Modeler stream from Tm1 process

Post by Palczan » Tue Jun 23, 2020 11:55 am

Hello everyone,

I find a solution about it.
You must add this script in the Stream (Tools, Stream Properties, Execution) and run the stream on the end.

Code: Select all

node = stream.findByID("Id_of_your_node")
node.setPropertyValue("admin_host", "admin_host_with_port");
node.setPropertyValue("server_name", "Server_test"); 
node.setPropertyValue("credential_type","inputcredential");
node.setPropertyValue("input_credential",["","login","password"]);
node.setPropertyValue("selected_view",["Sales_History","_Import to SPSS Modeler"]);
node.setPropertyValue("selected_columns",["Dim_1"]);
node.setPropertyValue("selected_rows",["Dim_2","Dim_3","Dim_4","Dim_5","Dim_6","Dim_7","Dim_8"]);

Post Reply