Dear forum,
thanks to ScottW I learned how to delete subsets in a TI bulk process: http://www.tm1forum.com/viewtopic.php?p=4107
Still, a subset can not be deleted in case a view uses it. So my aim is now to identify the obsolete subsets plus the views in which they are used so I can first delete the views and then the subsets.
I saw that the subsets used are actually mentioned in the .vue files, so one could basically scan the .vue files to identify the related subsets. Did anyone of you ever do that, and could you provide a code sample?
Thank you
Holger
Delete views and subsets using TI
-
- MVP
- Posts: 3241
- 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: Delete views and subsets using TI
Hello
How do you define obsolete view and obsolete subset?
How do you decide what subsets and views to delete?
How do you define obsolete view and obsolete subset?
How do you decide what subsets and views to delete?
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
-
- Posts: 131
- Joined: Tue May 17, 2011 10:04 am
- OLAP Product: TM1
- Version: Planning Analytics 2.0
- Excel Version: 2016
- Location: Freiburg, Germany
Re: Delete views and subsets using TI
Hello Wim,
we have a naming policy which allows to understand from the name of a view or a subset whether it was created in a TI process (provided we all stick to the policy
). So I can take a view or a subset, cycle through the }Processes dimension and see if the name matches one of the process names. This is supposed to cater for elements which we forget to delete in the epilog.
Regards
Holger
we have a naming policy which allows to understand from the name of a view or a subset whether it was created in a TI process (provided we all stick to the policy

Regards
Holger
-
- MVP
- Posts: 3241
- 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: Delete views and subsets using TI
Sorry to be difficult on this one, but I would prefer cleaning up/correcting existing code rather than trying to clean up the mess of non-optimal code. With yet another TI process / scheduled chore.holger_b wrote:Hello Wim,
we have a naming policy which allows to understand from the name of a view or a subset whether it was created in a TI process (provided we all stick to the policy). So I can take a view or a subset, cycle through the }Processes dimension and see if the name matches one of the process names. This is supposed to cater for elements which we forget to delete in the epilog.
Regards
Holger
This advice is based on your last sentence.
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
-
- MVP
- Posts: 3706
- Joined: Fri Mar 13, 2009 11:14 am
- OLAP Product: TableManager1
- Version: PA 2.0.x
- Excel Version: Office 365
- Location: Switzerland
Re: Delete views and subsets using TI
If you have this naming convention presumably you apply it to views created by TI as well. And also presumably only TI created views should be using these subsets right? So simply apply the same logic as you have already found but first to views and then to subsets.holger_b wrote:we have a naming policy which allows to understand from the name of a view or a subset whether it was created in a TI process (provided we all stick to the policy).
Or you can just download Bedrock.Cube.View.Delete and Bedrock.Dim.Subset.Delete where this is already baked right in.
-
- MVP
- Posts: 733
- Joined: Wed May 14, 2008 11:06 pm
Re: Delete views and subsets using TI
The attached processes will delete views and subsets beginning with a 'z'. Perhaps you can adapt the code to work with your own convention?holger_b wrote:we have a naming policy which allows to understand from the name of a view or a subset whether it was created in a TI process
- Attachments
-
- Sys Delete z Views.pro
- (3.42 KiB) Downloaded 948 times
-
- Sys Delete z Subsets.pro
- (3.4 KiB) Downloaded 873 times
Robin Mackenzie
-
- Posts: 131
- Joined: Tue May 17, 2011 10:04 am
- OLAP Product: TM1
- Version: Planning Analytics 2.0
- Excel Version: 2016
- Location: Freiburg, Germany
Re: Delete views and subsets using TI
Dear all,
thanks a lot for all your contributions! Of course I agree with Wim, at a first glance I also intended to brush up the existing code to solve that, but I soon realized that this is really time consuming since I would have to dig through thousands of lines of code to understand what exactly to do in the epilog to have the desired effect. Not to forget subsets and views created in processes which have vanished somehow in the meantime. And for sure I was bound to mess processes up inadvertently.
So I decided to actually do it like this: Most of the objects I want to get rid of are named like the TI process in which they are created. So first I loop through all the existing subsets (with the help of WildcardFileSearch) and compare them with the elements of the }Processes dimension. Beyond that I can catch a few other categories like *test*, *check* and so on which are possibly not worth to survive. Together with the }Dimensions dimension, I build a cube to store the information where these subsets can be found.
Next thing I loop through the views in a similar manner: I read through the .vue files, comparing the subsets mentioned in them with the elements in the "subsets" dimension which I populated in the run mentioned before. Again, I fill a cube, one dimension is views, the other one is }Cubes.
So I end up with two cubes which allow me to look through them before I finally delete the views and subsets so to prevent the deletion of items one would prefer to keep. Took me two days to set that up, certainly less time consuming than scanning all those maybe 200 TI processes. And it was fun to do
Regards
Holger
thanks a lot for all your contributions! Of course I agree with Wim, at a first glance I also intended to brush up the existing code to solve that, but I soon realized that this is really time consuming since I would have to dig through thousands of lines of code to understand what exactly to do in the epilog to have the desired effect. Not to forget subsets and views created in processes which have vanished somehow in the meantime. And for sure I was bound to mess processes up inadvertently.
So I decided to actually do it like this: Most of the objects I want to get rid of are named like the TI process in which they are created. So first I loop through all the existing subsets (with the help of WildcardFileSearch) and compare them with the elements of the }Processes dimension. Beyond that I can catch a few other categories like *test*, *check* and so on which are possibly not worth to survive. Together with the }Dimensions dimension, I build a cube to store the information where these subsets can be found.
Next thing I loop through the views in a similar manner: I read through the .vue files, comparing the subsets mentioned in them with the elements in the "subsets" dimension which I populated in the run mentioned before. Again, I fill a cube, one dimension is views, the other one is }Cubes.
So I end up with two cubes which allow me to look through them before I finally delete the views and subsets so to prevent the deletion of items one would prefer to keep. Took me two days to set that up, certainly less time consuming than scanning all those maybe 200 TI processes. And it was fun to do

Regards
Holger