Bedrock enhancements when clearing data

Post Reply
Wim Gielis
MVP
Posts: 3113
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Bedrock enhancements when clearing data

Post by Wim Gielis »

Hello all, especially Lotsaram and co-workers,

For a major TM1 site I have been developing a generic data clear procedure in Turbo Integrator, making use of Bedrock (v3).

The idea is to fill out an Excel file to indicate which slices of the data should be cleared. Then, record after record, TI reads the text file variant of the Excel file.
There are selection possibilities for dimensions in pairs:
- column A contains a dimension name like 'Year'
- column B contains the selection to be cleared like '2016 + 2017 + 2018'
- column C contains a dimension name like 'Scenario'
- column D contains the selection to be cleared like 'Actual'
- column E contains a dimension name like 'Version'
- column F contains the selection to be cleared like 'FIN*'
- and so on

I allow up the 5 'pairs' per record but that limit can be increased of course.

An additional column uses the TEXTJOIN function in Excel to concatenate the different, non-empty, dimension/element pairs. That TEXTJOIN function is awesome. It allows me to skip the pairs that are empty without creating empty selections. The end result of the concatenation goes to the pFilter argument in Bedrock (clear) processes.

Wildcards are supported in the selections: * and ? in selections lead to an MDX-driven subset.
With the ~ character as the first character of the selection, I take 'all elements except what follows'. ~FIN* means all elements except elements like FINAL.

Dimension names do not support wildcards but also there it could be extended.

The code will validate whether all supplied selection pairs are in fact selections in dimensions that are part of a cube to be cleared. So providing 4 selections in 1 record means that all 4 dimensions need to be part of the cube. If not, the record is rejected since clearing too much data is not harmless ;-)

As said, after initial validations, the process executes a number of Bedrock processes, notably data.clear. There I have a number of remarks:
- the mother process already creates MDX-driven subsets for selections if they contain wildcards. In the data clear Bedrock process, I do not want to create a new subset, since it already exists. Would there be an option to indicate that creating subsets is optional ? Right now I changed the data.clear Bedrock process to not create them or delete all its elements if it already exists, but a general parameter in the generic Bedrock process would be far better. I haven't checked Bedrock v4 if it already exists.
- Clearing data will be blocked bij TM1 when 1 or more subset element is locked. Would it be possible to check for locked elements in the generic data clear process such that this case is avoided ? It would need a loop over the relevant elements in the }ElementProperties control cube, so I don't think it's a major change. If that control cube does not exist, we can avoid the loop.

For this customer I used Bedrock since it came rather close to my data clear purposes but if the deviation of the Bedrock process and what I need to do would be bigger, I would have rolled my own TI process rather than using Bedrock. Still it turns out that by making the Bedrock processes a bit more generic, we can allow many more combinations.

Best regards,

Wim
Best regards,

Wim Gielis

IBM Champion 2024
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
lotsaram
MVP
Posts: 3652
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Bedrock enhancements when clearing data

Post by lotsaram »

Bedrock 3 is not in development or anymore actively supported.

Anyone who wants to submit an enhancement request for bedrock 4 at the bedrock page on GitHub is free to do so. Likewise anyone who wants to contribute is more than welcome!

The idea to ignore (and use as is rather than empty and rebuild) subsets is a good one. bedrock.hier.sub.create already supports this with the pAddToSubset parameter, adding the same option to bedrock.cube.view.create seems a good enhancement IMO.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
Wim Gielis
MVP
Posts: 3113
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Bedrock enhancements when clearing data

Post by Wim Gielis »

Hello Lotsaram,

Thanks for your feedback.
I knew that Bedrock V3 is not extended anymore and that's not an issue at all. This customer is stuck with TM1 10.2.2 FP3 so Bedrock V4 is not an option. I know that version is not supported anymore but IBM could be replaced soon.

That being said, my TI processes work fine and there is no real need anymore. I just wanted to note the enhancement requests for Bedrock V4. I am not having a lot of free time these days so if anyone can contribute for the enhancement(s), go ahead.
Best regards,

Wim Gielis

IBM Champion 2024
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
Post Reply