TI to copy data

Post Reply
AWILDE
Posts: 28
Joined: Wed Sep 16, 2009 4:33 pm
OLAP Product: TM1
Version: 9.4
Excel Version: 2003

TI to copy data

Post 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!
Jeroen Eynikel
Community Contributor
Posts: 139
Joined: Mon Sep 15, 2008 1:45 pm

Re: TI to copy data

Post 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.
AWILDE
Posts: 28
Joined: Wed Sep 16, 2009 4:33 pm
OLAP Product: TM1
Version: 9.4
Excel Version: 2003

Re: TI to copy data

Post 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.
User avatar
Steve Rowe
Site Admin
Posts: 2456
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: TI to copy data

Post 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
Technical Director
www.infocat.co.uk
Post Reply