Hello All,
I am new to Cognos TM1 and have to create a TI process to copy data for specific fields from a particular month of a year for Version 1 to all the months of next year for version 2.
e.g. Data for Nov-16 for version 1 is to be copied to months from Jan-17 to Dec-17 for version 2 of the same cube. Also I have to generalise this process so that it can be reused for different months.
Looking forward for responses. Thanks!!!
Need help to create TI process to copy data
-
- Posts: 28
- Joined: Wed Jan 18, 2017 3:27 pm
- OLAP Product: Cognos TM1
- Version: 10.2.2, 11
- Excel Version: Excel2010
- Location: Bangalore, India
Need help to create TI process to copy data
Regards,
Amit Saxena
India
Amit Saxena
India
-
- Regular Participant
- Posts: 159
- Joined: Fri Aug 12, 2016 10:02 am
- OLAP Product: tm1
- Version: 10.2.0 - 10.3.0
- Excel Version: 2010
Re: Need help to create TI process to copy data
emmm... Use
maybe should use bedrock process !
Code: Select all
while
copy data from one month to other month
end;
-
- Community Contributor
- Posts: 311
- Joined: Fri Feb 15, 2013 5:49 pm
- OLAP Product: TM1
- Version: PA 2.0.9.1
- Excel Version: 365
- Location: Minneapolis, USA
Re: Need help to create TI process to copy data
To expand on what Drg said, you can use a WHILE loop to apply one value to multiple target elements, periods in this case. If I'm understanding your question right, you're trying to take a value from one month in the current year, say October, and write that value to all the months in the next year, Jan-Dec. Below is an example of a WHILE loop that would write the value from the view source in the cube SomeCube to all the time periods in the Time dimension subset Next Year.
Code: Select all
vDim1 = 'Time';
vSubset1 = 'Next Year';
vVersionTar = 'Version 2';
vCube1 = 'SomeCube';
index1 = 1;
vLimit = SubsetGetSize(vDIM1, vSubset1);
WHILE(index1 <= vLimit);
vTimeTar = SubsetGetElementName(vDim1, vSubset1, index1);
CellPutN(Value, vCube1, vVersionTar, vTimeTar);
index1 = index1 + 1;
END;
- tiagoblauth79
- Posts: 25
- Joined: Fri Aug 26, 2016 1:42 pm
- OLAP Product: Cognos BI and TM1
- Version: 10.2.2
- Excel Version: 10
- Contact:
Re: Need help to create TI process to copy data
Hi. We like new guys so we think we are smart. But no one will create the full code for you.
The source date, target start date and end date can be in the process parameters.
Beginners do one process per cube. If you have more than one cube to copy, you can create a master process to run the copy from all cubes.
Each process: You should create a view to read the data from the cube, create a simple view and adjust filters in the prolog.
Prolog: recreate the view and apply the filters you need (ViewDestroy, ViewCreate, SubsetDestroy, SubsetCreate, ViewSubsetAssign). A few people will suggest you to adjust the view in an external process, I never have any issue with this approach in version 10.1 and superior.
Data: with a WHILE, write the values in the interval of data to the target start and end date, if you create the time dimension by using the Modeler, you have a numeric attribute that determines the date. Much easiest to check if the date is in the interval of dates. (WHILE, ATTRN, CellPutN)
Epilog: clean temporary view and subsets (ViewDestroy, SubsetDestroy).
Good luck.
The source date, target start date and end date can be in the process parameters.
Beginners do one process per cube. If you have more than one cube to copy, you can create a master process to run the copy from all cubes.
Each process: You should create a view to read the data from the cube, create a simple view and adjust filters in the prolog.
Prolog: recreate the view and apply the filters you need (ViewDestroy, ViewCreate, SubsetDestroy, SubsetCreate, ViewSubsetAssign). A few people will suggest you to adjust the view in an external process, I never have any issue with this approach in version 10.1 and superior.
Data: with a WHILE, write the values in the interval of data to the target start and end date, if you create the time dimension by using the Modeler, you have a numeric attribute that determines the date. Much easiest to check if the date is in the interval of dates. (WHILE, ATTRN, CellPutN)
Epilog: clean temporary view and subsets (ViewDestroy, SubsetDestroy).
Good luck.
-
- Posts: 8
- Joined: Thu Feb 28, 2013 9:45 pm
- OLAP Product: TM1
- Version: 10.2.2
- Excel Version: 2010
Re: Need help to create TI process to copy data
Hello,
Did you notice that since TM1 10.2.2 FP4 you could use an additional optional parameter which, when you create objects (subsets & views), will make them temporary so no more cleaning needed in the Epilog, they'll be automatically destroyed once the TI process has finished.
See : http://www-01.ibm.com/support/docview.w ... wg27046436
Did you notice that since TM1 10.2.2 FP4 you could use an additional optional parameter which, when you create objects (subsets & views), will make them temporary so no more cleaning needed in the Epilog, they'll be automatically destroyed once the TI process has finished.
See : http://www-01.ibm.com/support/docview.w ... wg27046436
-
- MVP
- Posts: 3222
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.1.5
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: Need help to create TI process to copy data
Hi Robert,BobMilli wrote: ↑Wed Oct 18, 2017 2:14 pm Hello,
Did you notice that since TM1 10.2.2 FP4 you could use an additional optional parameter which, when you create objects (subsets & views), will make them temporary so no more cleaning needed in the Epilog, they'll be automatically destroyed once the TI process has finished.
See : http://www-01.ibm.com/support/docview.w ... wg27046436
Long time no see, hope all is well with you !
Just to add that indeed 10.2.2 FP4 had this functionality but temporary objects for the data source of a TI process did not work correctly in that version. In some version launched soon after it IBM corrected it so 10.2.2 FP4 base version is not sufficient.
Best regards,
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly