Page 1 of 1

TI to copy data

Posted: Mon Mar 22, 2010 2:20 pm
by AWILDE
Hi,

I am wanting to copy a scenario and all the data using a TI process, e.g. I want to copy all the actual data to a new scenario called budget. Scenario is a dimension within a cube. Everything will be a like for like copy.

I have not done much with TI appart from written SQL data queries and loaded them into a cube, Can anyone tell me how to do this or point me in the direction of instructions for writing this kind of simple TI process. I really need to learn more about TI!

Re: TI to copy data

Posted: Mon Mar 22, 2010 2:40 pm
by Jeroen Eynikel
Hi,

there are a couple of ways to do this.

In the most rudimentary form:

- set the datasource to cubeview in the TI
- create the view that you want to use as source

From then on it is the same as with a relational db as source (*), i.e. you specify variable names, types and what TI should do with them. Just experiment a little bit.

(* the most important differences. By default TM1 will ignore all zeros, consolidated values and rule calculated values from the source. If you need any of these loaded in the other cube you have to tell TM1 to include them explicitely when your datasource is a cube)

Once you have the rudimentary form working I would really suggest building something a bit more polished certainly if it is something which will have to be repeated in the future.

More polished =

* Create your sourceview(**) in code on the prolog tab, instead of creating it manually. Delete the sourceview in code as well. It only needs to exist while the process runs.

* Include a zero out view on the target cube in code.

* add parameters. For instance if you have to do this once a month and only need to copy a month of data, make month and year parameters that are filled in at run time.


** You will need the following functions and you will have to create the code yourself as the wizard is not able to do this sort of thing

SubsetCreate / SubsetSetCreateByMDX / SubsetDestroy:
Creating and cleaning a subset on a given dimension. You will want subsets for every dimesnion in your source:
ViewCreate / ViewDestroy: create / clear a view
ViewZeroOut( if you need a clear on the target first) / ViewDestroy
ViewSubSetAssign: assign a subset to a view.

Re: TI to copy data

Posted: Mon Mar 22, 2010 3:13 pm
by AWILDE
Thanks for the reply.

The bit I am struggling with is understanding how to set the data variable. I have set the cube view to extract all but only actual on the scenario and then in the variables I have set each dimension to other in the contents and the value to data.

I then have the below statement in the data tab:

CellPutN(Data,'Reporting BS',Intercompany,ReportingCurrency,Baltype,'Forecast1',ReportingEntity,BSMeasures,FY);

However then get the error saying data is undefined.

I am sure I am missing basic concept here.

Re: TI to copy data

Posted: Mon Mar 22, 2010 4:55 pm
by Steve Rowe
Hi Awilde,
If you are writing all the script yourself (which I am guessing you are from the sample you provide) then all your variables need to be set to other, including the one holding the data to be loaded. I think you say you have set this to data in you message?

Cheers