cubewise-code / tm1py

TM1py is a Python package that wraps the TM1 REST API in a simple to use library.
http://tm1py.readthedocs.io/en/latest/
MIT License
184 stars 107 forks source link

Execute TM1Py from PA Cloud #846

Closed scotthoopes closed 1 year ago

scotthoopes commented 1 year ago

Describe what did you try to do with TM1py We are trying to trigger TM1Py scripts from PA Cloud.

Describe what's not working the way you expect Didn't get the expected result? Describe:

Is this possible? I found a thread that @MariusWirtz commented in.

[https://community.ibm.com/community/user/businessanalytics/discussion/rest-api-data-load-into-ibm-pa?ReturnUrl=%2fcommunity%2fuser%2fbusinessanalytics%2fcommunities%2fcommunity-home%2fdigestviewer%3fcommunitykey%3d8fde0600-e22b-4178-acf5-bf4eda43146b]

Marius said there were three ways to do it.

  • you can package python + the TM1py script with PyInstaller and move the executable into the '/scripts' folder so that it can be called from TI through ExecuteCommand. Then schedule with Chores.
  • you can develop, deploy and schedule your script on a platform like DataLore or Replit (both platforms offer free plans for testing)
  • you can run your TM1py script on an on-premise server too and schedule with Task Scheduler

We are currently planning on using the 3rd option but we are running into a lot of issues for when we want users to be able to run processes Ad Hoc. But I would love to learn more about the first option. Any details on how to do this in Planning Analytics Cloud?

MariusWirtz commented 1 year ago

You can use PyInstaller to build an exe from a python script. You can find details in this TM1py Tale on how to build the exe. https://cubewise-code.github.io/tm1py-tales/2021/connection-checker.html

However, it's not an ideal solution as IBM discussed in a recent AMA. The preferred solution would be that IBM offers an easier option to execute a TM1py script from PAoC as suggested in this RFE. https://ibm-data-and-ai.ideas.ibm.com/ideas/PAOC-I-1094