Retrieving cube rules from TI or API

Post Reply
robchr
Posts: 23
Joined: Wed Sep 30, 2009 1:41 pm
OLAP Product: TM1
Version: 9.4.1 FP03 32-bit
Excel Version: 2007

Retrieving cube rules from TI or API

Post by robchr »

I've looked, and there doesn't seem to be a straightforward way of getting at the cube rules from TI or the API. I wanted to put together an audit cube that finds all instances of an element, including within cube rules. Does anyone know of a way using TI or the API to get at cube rules?

Thanks in advance!
User avatar
paulsimon
MVP
Posts: 808
Joined: Sat Sep 03, 2011 11:10 pm
OLAP Product: TM1
Version: PA 2.0.5
Excel Version: 2016
Contact:

Re: Retrieving cube rules from TI or API

Post by paulsimon »

Rob

I would use the following approach

TI process using the }Cubes subset as the data source

The Data Tab reads in the name of each cube from the subset

It checks to see if a file of the name cube name.RUX exists in the server's data directory.

If it does then it then Executes another TI process, passing in a parameter of the current cube name.

This process has a file data source, which it changes to be the rules file cube name.RUX

(DatasourceNameForServer='Name';) if you don't already know.

The process will have a single text variable representing a line from the RUX file

The Data Tab will then need to parse each rule line to split it in to element names

You can then populate your audit cube from this.

You will need to bear in mind that the RUX may have used Aliases rather than actual Element Names, and, unless you have prefixed your element names appropriately, eg all Nominals have N_ in front, then it may be less than easy to work out which dimension the element is from. You can use TABDIM to extract a list of dimensions in a cube.

When you get this working, I would appreciate a cube, in return.

Regards

Paul Simon
robchr
Posts: 23
Joined: Wed Sep 30, 2009 1:41 pm
OLAP Product: TM1
Version: 9.4.1 FP03 32-bit
Excel Version: 2007

Re: Retrieving cube rules from TI or API

Post by robchr »

Thanks for the tip, Paul! I'll give it a try and then post the code if I get it working properly.

Cheers,

Rob
Post Reply