Page 1 of 1

Automation help

Posted: Wed Mar 06, 2013 3:42 pm
by TM1ethusiast
We have two cubes A and B,currently when the data is populated in the cube A ,there is a process that has to be run in order to populate the data in Cube B.What we intend to do is automate the process in such a way that ,the process should check the forecast for particular month(it is 201201 format) in the cube ,if it is there then it should execute the process which populate the data in cube B.How to achieve this? Your help will be highly appreciated.Thanks

Re: Automation help

Posted: Wed Mar 06, 2013 4:10 pm
by jim wood
If the data in cube A is loaded via a TI process I would create a control cube. When the first process executes it writes a 1 to that cube. Within the second process do a check for 1 on that cube. If not a 1 then use ProcessQuit. If there is a 1 in the cube run the process and then in the epilog write a 0 back to the cube. Using this method you can add the second process to a chore which you can set run whenever you want it to run. I'm sure there are some other approaches out there. This should give you something to think about. That or you could simply execute the second process in the epilog of the first. I'm not completely clear about your requirement, hopefully either or should help,

Jim.

PS. Instead of using a control cube you could always use a text file instead. (FileExists and all that)

Re: Automation help

Posted: Wed Mar 06, 2013 5:24 pm
by David Usherwood
If you used a rule (and feeder) the data would be in Cube B when it was in Cube A :)

Re: Automation help

Posted: Wed Mar 06, 2013 6:07 pm
by TM1ethusiast
Thanks for your replies.I would explain myself again.There are set of processes that are run by end-users themselves,this loads 'Actual' data into the Cube A.Then we have to manually run a process to that loads the data from Cube A to Cube B. We want to get rid of the manual intervention and automate the process in such a way that there should be a mechanism to check the Actual from the scenario dimension and time (201201) from the time dimension and load that Actual data which comes from data warehouse to Cube B.Appreciate if someone could please provide sample TI.Thanks a lot.

Re: Automation help

Posted: Wed Mar 06, 2013 9:55 pm
by jim wood
Now you've covered what you need in slightly more detail I would go with David's very sound advice.

Re: Automation help

Posted: Wed Mar 06, 2013 10:43 pm
by lotsaram
TM1ethusiast wrote:Thanks for your replies.I would explain myself again... Appreciate if someone could please provide sample TI.Thanks a lot.
At the risk of sounding like an old cantankerous broken record what have you tried? (apart from posting the same question on multiple forums)

There simply is not going to be a "sample TI" for what you want to to because each model, situation and context is unique. Yes someone could provide a sample of code (maybe) that was used in a similar situation but it is not going to be exactly what you need. Honestly your requirement sounds relatively trivial and by the time you adapted someone else's code you would have been better off writing your own.

If you want to eliminate manually running the second TI to populate cube B then you have 3 main options
- chain the 2nd process to the first so that when users trigger the process to load cube A then cube B is loaded as well
- schedule the process to load cube B in the background on a regular basis
- don't have a TI and link cube B to cube A with a rule (as David suggested)

To make the copy to cube B context sensitive on the basis of version and time obviously you will need a logic check in an IF statement. To make this work most efficiently you may need to hold a value in a control cube or to have some attributes that don't currently exist (another reason why the notion of providing a generic code snipit for this is a little absurd). At the most basic level in TI you will need a CellGetS or CellGetN to call a cell value to evaluate at AttrS for an attribute.

I don't think it is worth going any deeper unless you can provide some kind of evidence a) that the problem is more significant and b) that you have actually done some work to try and solve it yourself.

Re: Automation help

Posted: Thu Mar 07, 2013 8:53 am
by AmbPin
Hello,
Another question might be why do you need two seperate cubes in the first place?

Re: Automation help

Posted: Thu Mar 07, 2013 6:31 pm
by jim wood
lotsaram wrote:
TM1ethusiast wrote:Thanks for your replies.I would explain myself again... Appreciate if someone could please provide sample TI.Thanks a lot.
At the risk of sounding like an old cantankerous broken record what have you tried? (apart from posting the same question on multiple forums)

There simply is not going to be a "sample TI" for what you want to to because each model, situation and context is unique. Yes someone could provide a sample of code (maybe) that was used in a similar situation but it is not going to be exactly what you need. Honestly your requirement sounds relatively trivial and by the time you adapted someone else's code you would have been better off writing your own.

If you want to eliminate manually running the second TI to populate cube B then you have 3 main options
- chain the 2nd process to the first so that when users trigger the process to load cube A then cube B is loaded as well
- schedule the process to load cube B in the background on a regular basis
- don't have a TI and link cube B to cube A with a rule (as David suggested)

To make the copy to cube B context sensitive on the basis of version and time obviously you will need a logic check in an IF statement. To make this work most efficiently you may need to hold a value in a control cube or to have some attributes that don't currently exist (another reason why the notion of providing a generic code snipit for this is a little absurd). At the most basic level in TI you will need a CellGetS or CellGetN to call a cell value to evaluate at AttrS for an attribute.

I don't think it is worth going any deeper unless you can provide some kind of evidence a) that the problem is more significant and b) that you have actually done some work to try and solve it yourself.
Thanks for the summary

Re: Automation help

Posted: Thu Mar 07, 2013 6:32 pm
by jim wood
AmbPin wrote:Hello,
Another question might be why do you need two seperate cubes in the first place?
Having a data holding / processing / planning cube and a seperate reporting cube is quite common.