Page 1 of 1
How run a SPSS Modeler stream from Tm1 process
Posted: Thu Jun 18, 2020 12:30 pm
by Palczan
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?
Re: How run a SPSS Modeler stream from Tm1 process
Posted: Thu Jun 18, 2020 1:32 pm
by Emixam
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 !
Re: How run a SPSS Modeler stream from Tm1 process
Posted: Thu Jun 18, 2020 4:06 pm
by Elessar
Hi,
As an addition: refer to this documentation to create the bat/cmd file:
https://www.ibm.com/support/knowledgece ... rence.html
Re: How run a SPSS Modeler stream from Tm1 process
Posted: Mon Jun 22, 2020 6:28 am
by Palczan
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
Re: How run a SPSS Modeler stream from Tm1 process
Posted: Mon Jun 22, 2020 7:11 am
by Elessar
- Which IntegratedSecurityMode do you use? If 5, try with 1
- Do you have SPSS Modeler Server installed? You can store credentials there
Re: How run a SPSS Modeler stream from Tm1 process
Posted: Mon Jun 22, 2020 8:48 am
by Palczan
1. I set a IntegratedSecurityMode = 1
2. i have only SPSS Modeler 18.2.1
Re: How run a SPSS Modeler stream from Tm1 process
Posted: Mon Jun 22, 2020 10:37 am
by Elessar
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?
Re: How run a SPSS Modeler stream from Tm1 process
Posted: Mon Jun 22, 2020 11:05 am
by Palczan
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
Re: How run a SPSS Modeler stream from Tm1 process
Posted: Mon Jun 22, 2020 11:14 am
by Elessar
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
Re: How run a SPSS Modeler stream from Tm1 process
Posted: Tue Jun 23, 2020 8:15 am
by Palczan
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
Re: How run a SPSS Modeler stream from Tm1 process
Posted: Tue Jun 23, 2020 8:24 am
by Elessar
Domain is for CAM security. You do not need it with ISM=1
Re: How run a SPSS Modeler stream from Tm1 process
Posted: Tue Jun 23, 2020 11:55 am
by Palczan
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"]);
Re: How run a SPSS Modeler stream from Tm1 process
Posted: Tue Jul 14, 2020 9:05 am
by Palczan
Hello everyone,
On the last answer i wrote that i had a solutions.I tried to run a batch file from tm1 process .Unfortunelly, this process doesn't worked. luckly a few days ago i find the solutions. Firstly, i must write a script for tm1 import and tm1 export in SPSS. This code find on this page
https://www.ibm.com/support/knowledgec ... lots.html
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"]);
The next stage is simple. you must add to the tm1 process a simple script. This script is below
Code: Select all
sCommand='"C:\Program Files\ibm\SPSS\Modeler\18.2.1\bin\clemb.exe" -stream "C:\Stream1 trying.str" -execute -log "C:\Stream1 trying.log"';
ExecuteCommand(sCommand,1);
And this is all. If you will have a problem, please ask me on private message