Page 1 of 1

RunProcess within RunProcess and Data commit

Posted: Mon Aug 10, 2020 7:52 pm
by sreesuku
Hi Team,

I have the below scenario. I have 3 cubes - A,B,C.
Cube A (staging cube) is where the user entered values are stored temporarily and then pushed to cube B (Data storage cube) via a TI (TI No-1).

Cube C is a Calculation cube which gets data points from Cube B using a TI (TI No- 2), based on the value entered in the Cube A.
For eg : If a user enters some ID number in Cube A, for that ID TI No-2 gets the values from Cube B and pushes to cube C.

Currently this updation process ( A to B to C) is slow. To make this faster I am using a set of RUN Process commands by splitting the number of IDs in to 4 different threads which can run in parallel. So, if there are 20 IDs, there will be 4 threads each handling 5 IDs.

I am using a master process, which will call the TI No-1 in its epilog using 4 different RUN Process commands each thread contains 5 unique IDs.
(Consider Total IDs as 20). I am passing a parameter called 'ThreadNo" which is used to make all subsets, view names unique per thread.
Again in the epilog of TI No-1, I am calling TI No-2 using 4 different RUN Process commands, each set contains 5 unique IDs.
TI-No2 runs based on the "ThreadNo" parameter. Eg : 2nd RunProcess command will be executed only if the ThreadNo parameter value = 'Thread2'

I am observing some data issues here. Data is getting updated in the Cube C only for a some threads only.
I would like to know how the data commits happen here. As I am calling the TI No2 in the epilog on TI number 1 (using RunProcess), data would have got committed in Cube B, before my TI No2 pulls from that cube ?

As I am running by Thread , will I be able to pull data for the IDs from Cube B for Thread1 and update Cube C, even though Thread2 is in running state as each thread handles unique set of IDs?

Regards
Sree

Re: RunProcess within RunProcess and Data commit

Posted: Tue Aug 11, 2020 7:45 am
by MarenC
I experienced something similar and used the Sleep function between each runprocess, which seemed to then populate all the data.

Re: RunProcess within RunProcess and Data commit

Posted: Tue Aug 11, 2020 10:11 am
by sreesuku
MarenC wrote: Tue Aug 11, 2020 7:45 am I experienced something similar and used the Sleep function between each runprocess, which seemed to then populate all the data.
Many thanks for the update. Can you please let me know how did you achieve that sleep function ?

Thanks
Sree

Re: RunProcess within RunProcess and Data commit

Posted: Tue Aug 11, 2020 10:15 am
by sreesuku
MarenC wrote: Tue Aug 11, 2020 7:45 am I experienced something similar and used the Sleep function between each runprocess, which seemed to then populate all the data.
Are you talking about the SLEEP function itself ?

Re: RunProcess within RunProcess and Data commit

Posted: Tue Aug 11, 2020 10:22 am
by MarenC
Hi,

Yes the Sleep function itself, see this comment here:

https://tm1forum.com/viewtopic.php?f=3&t=14841#p75262

Maren

Re: RunProcess within RunProcess and Data commit

Posted: Tue Aug 11, 2020 5:59 pm
by sreesuku
MarenC wrote: Tue Aug 11, 2020 10:22 am Hi,

Yes the Sleep function itself, see this comment here:

https://tm1forum.com/viewtopic.php?f=3&t=14841#p75262

Maren
Thanks for the update. How do u decide that how much time the process should be on Sleep ?
I mean is there a way to find out the completion of the previous thread

Re: RunProcess within RunProcess and Data commit

Posted: Wed Aug 12, 2020 7:30 am
by MarenC
Hi,

I didn't use any magic formula to determine how long the sleep should be set for.

I simply decided to set it as low as possible and in my case the low value made it work.

Obviously lower is better because the idea of runprocess is to speed things up and adding in sleep slows things down, so I want sleep to be low enough not to make runprocess pointless!

If you do find a magic formula I would be very interested in it, but all I can offer is trial and error!

Maren