Page 1 of 1

Input->Calculate->Report

Posted: Wed Jun 27, 2012 5:54 pm
by EP_explorer
I want to make such process in Contributor (but I think it doesn't matter in which client)

Users input data in Input Cube,
after it they click button which launch TI process.

TI process will have 2 steps (2 another TI processes)

1 step transfers data from input Cube to Cubes where calculations (using rules) takes place.

2 step transfers calculated data to Report Cubes.

So I have a question. When 1 step (TI process) ended, it takes some time to calculate data in Calculation Cubes. So when the 2 step started can it be what it will transfer to Report Cubes data which not recalculated yet. Or it will be waited for time when calculations in Calculation Cubes will have ended?

If not (2 TI process will not wait) - is it possible to force second TI process to wait until calculations in Calculation Cubes will have ended?

Re: Input->Calculate->Report

Posted: Wed Jun 27, 2012 6:07 pm
by declanr
Why don't you either do the rule calculations within the TI instead of a cube with rules and transfer straight to the reporting cube?
Or have rules from the "calculation" cube to the reporting cube?

Re: Input->Calculate->Report

Posted: Wed Jun 27, 2012 6:33 pm
by EP_explorer
declanr wrote:Why don't you either do the rule calculations within the TI instead of a cube with rules and transfer straight to the reporting cube?
Or have rules from the "calculation" cube to the reporting cube?
Both ways aren't good

1. Rules make it much faster than TI process
2. Against problems - excessive growth of feeders (it is impossible to avoid overfeeding or using condition feeders which also lead to launch of TI process which recalc condition feeders) and therefore using of memory.

It is another way exists - connect input cubes with calculated Cubes - but it is incovinient for users - input become a problem because it starts recalculating after every input in picklist or every click to Enter and it takes time.

Re: Input->Calculate->Report

Posted: Wed Jun 27, 2012 7:13 pm
by tomok
Why are you worrying about when the calculations will happen? You have no control over it. If a cell is a calculated via a rule, then any use of that cell, whether in a report, or TI process, will trigger the calculation to be performed (unless the value has already been cached AND nothing has happened that would cause the end result to be different). In other words, you don't have to wait for anything, TM1 will naturally calculate the amounts first, before your Step 2 happens.

Re: Input->Calculate->Report

Posted: Wed Jun 27, 2012 8:37 pm
by rkaif
I agree with Tomok and Declanr for this scenario.
EP_explorer wrote:is it possible to force second TI process to wait until calculations in Calculation Cubes will have ended?
But if someone wants to introduce some delay between the processes then you can do it using the Sleep command in Windows.

Code: Select all

SLEEP x     ( where x is the number of seconds to pause)
In TM1/TI you can use the ExecuteCommand(CommandLine, Wait); function to execute the DOS command. Make sure you set the Wait argument to 1 so that it will wait for the command line to execute before proceeding to the next statement in your TI.

Re: Input->Calculate->Report

Posted: Thu Jun 28, 2012 3:42 am
by EP_explorer
tomok wrote:Why are you worrying about when the calculations will happen? You have no control over it. If a cell is a calculated via a rule, then any use of that cell, whether in a report, or TI process, will trigger the calculation to be performed (unless the value has already been cached AND nothing has happened that would cause the end result to be different). In other words, you don't have to wait for anything, TM1 will naturally calculate the amounts first, before your Step 2 happens.
I haven't connected with the described situation - so of course I'm worrying ;-) . I try today this process and I hope it will behave as you described.

Re: Input->Calculate->Report

Posted: Fri Jun 29, 2012 2:04 am
by rmackenzie
tomok wrote:Why are you worrying about when the calculations will happen? You have no control over it. If a cell is a calculated via a rule, then any use of that cell, whether in a report, or TI process, will trigger the calculation to be performed (unless the value has already been cached AND nothing has happened that would cause the end result to be different). In other words, you don't have to wait for anything, TM1 will naturally calculate the amounts first, before your Step 2 happens.
Although I totally agree with you regards the OP's original point (i.e. no need to worry), isn't it the case that any potential performance impact of calculations will be felt when the results are queried in step 2? It is just feeders needing to be set in step 1 that could cause a delay.
rkaif wrote:But if someone wants to introduce some delay between the processes then you can do it using the Sleep command in Windows.

Code: Select all

SLEEP x     ( where x is the number of seconds to pause)
In TM1/TI you can use the ExecuteCommand(CommandLine, Wait); function to execute the DOS command. Make sure you set the Wait argument to 1 so that it will wait for the command line to execute before proceeding to the next statement in your TI.

Are you aware of TI's sleep command (I believe it is undocumented):

Code: Select all

 # this will sleep for 10,000 milliseconds
Sleep ( 10000 );
;)