Page 1 of 1
Run TI via tm1py
Posted: Wed Oct 02, 2024 4:21 pm
by Mithun.Mistry1103
Hello all
Some advise if possible please, trying to run TI processes from desktop. Has anyone written any python code or is there any other technology ie batch used that will allow us to execute TM 1 processes from server or from device?
Any ideas?
Thank you
Re: Run TI via tm1py
Posted: Wed Oct 02, 2024 6:24 pm
by Wim Gielis
Maybe show us the code you already have with explanations what it should be doing and why it does not work - if possible.
Re: Run TI via tm1py
Posted: Wed Oct 02, 2024 6:25 pm
by Emixam
You can use
tm1runti or use
ProcessService class from tm1py.
Re: Run TI via tm1py
Posted: Wed Oct 02, 2024 7:48 pm
by Wim Gielis
Or run them from PAfE. Or from any scripting language using the TM1 REST API.
Re: Run TI via tm1py
Posted: Wed Oct 02, 2024 9:14 pm
by Mithun.Mistry1103
An example I found was this and this would be something Id be looking to work with as a start of a 10
from TM1py import Process
from TM1py.Services import TM1Service
process = Process(name="dim.Oracle could update - MASTER")
success, status, error_log_file = tm1.processes.execute_process_with_return(process)
if success:
print("Process executed successfully")
else:
print("Process execution failed. Status: " + status + ". Path to error log file: " + error_log_file)
Just a script allowing me to run a savedataall process by executing this either from my desktop screen or from the server.
Re: Run TI via tm1py
Posted: Thu Oct 17, 2024 7:36 pm
by MariusWirtz
That example is not entirely accurate.
In TM1py, you can execute existing TI processes like this:
https://gist.github.com/MariusWirtz/999 ... -return-py
You can also execute "unbound" TI processes.
That means your process is immediately executed in TM1 but never actually created. This can be useful if you need to call an exotic TI function that is not natively available in REST API / TM1py.
Here is an example:
https://gist.github.com/MariusWirtz/1c1 ... 3e92fdab74
In your example, you are sort of mixing both approaches. That shouldn't work.