Creating TI Process by running a TI Process

Post Reply
vasek1192
Posts: 47
Joined: Sun Jan 24, 2021 5:55 pm
OLAP Product: IBM Planning analytics
Version: 2.0.9.3
Excel Version: 2019

Creating TI Process by running a TI Process

Post by vasek1192 »

Hello, the question of the day: Can you create a TI process in TI process? (inception sounds in the distance)

I would love to create a process that creates a TI process that would load data from cube determined by parameter into cube determined by another parameter. I would name it a Loadator_L_800 and be proud of my creation. I would however not like to spend a weekend trying to do something that cannot be done.

Generating the code and exporting it as .pro file into the right folder is doable, its just a question of right functions and looping yourself into oblivion but how to set up a Data Source is at this point beyond me.

Any thoughts?
Wim Gielis
MVP
Posts: 3223
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Creating TI Process by running a TI Process

Post by Wim Gielis »

Hello,

I would indeed advise you to:
- first make a process yourself, with 2 cubes of "decent size". Let's say, about 6-8 dimensions. Add in some variety to make it more realistic and help in coding below.
- then inspect the PRO file and its structure. It will contain codes that are explained here by Alexander Sutcliffe based on findings of, among others, myself. Also see file:///C:/ibm/cognos/tm1_64/TM1JavaApiDocs/constant-values.html. Here Alexander wrote about the PRO file and its codes.

Like that, you can create a new TI process to generate a PRO text file with all necessary contents and correct encoding and such.
The Expand function will most probably be useful too.
Last step is to pick up the PRO file, drop it in the TM1 data directory, restart the model and it's done.

I did similar things in the past, but then from Excel VBA and hot promotion through the (old) VB API. It worked fine but also caused a lot of headaches. Random crashes and bad pointers, anyone ? Luckily, this is behind us.

Nowadays, there is the TM1 REST API which allows creating processes live using any tool of your liking, able to execute POST HTTP requests.
tm1py is a popular choice if you want to use Python scripting. Many other tools will be similar in spirit.

If you want to embark on the TM1 REST API journey, have a look here for starters, using Excel VBA - excellent material by George Tonkin.
With the TM1 REST API there is the possibility to use a POST request to /CompileProcess to ask the server whether the code is sound or does have compile errors, prior to posting the process definition. With /tm1.Compile you can verify whether an existing process that is in a running TM1 server, does not have syntax errors.

Last thing to add, you might also be interested in a generic Bedrock process. That could be an alternative solution and save you time.
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
lotsaram
MVP
Posts: 3698
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Creating TI Process by running a TI Process

Post by lotsaram »

I don't really have anything to add to Wim's already excellent post except to emphasize that creating a new process each time you want to load data from one cube to another seems like a very odd thing to do. Much better to simply have a generic process to do this job.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
vasek1192
Posts: 47
Joined: Sun Jan 24, 2021 5:55 pm
OLAP Product: IBM Planning analytics
Version: 2.0.9.3
Excel Version: 2019

Re: Creating TI Process by running a TI Process

Post by vasek1192 »

Thanks a lot, that was super helpful :)
Wim Gielis
MVP
Posts: 3223
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Creating TI Process by running a TI Process

Post by Wim Gielis »

I agree with Lotsaram. Generic processes exist.

Creating new processes is overkill, puts locks on the server, requires appropriate security, and will take time to develop and test.
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Post Reply