Creating a cube with a variable number of Dimensions

Post Reply
CoN73mP7
Posts: 37
Joined: Wed May 18, 2011 7:48 am
OLAP Product: TM1
Version: 9.5
Excel Version: 2003
Location: Stuttgart, Germany
Contact:

Creating a cube with a variable number of Dimensions

Post by CoN73mP7 »

Hi,

I'm building Dimensions from a Star-Scheme. So at the end of this process, I've got a number of Dimensions and want to add them to a Cube. How should I do this?

I can't build a TI-Process, because I don't know the number of Dimensions I need to add in the CubeCreate() Function.

Greetings
Alex
User avatar
jim wood
Site Admin
Posts: 3958
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: Creating a cube with a variable number of Dimensions

Post by jim wood »

You can't add dimensions to cubes for a starter for 10. You'll need to recreate the cube every time. You'll then have to consider how I can export and remap data previously in the cube.
Struggling through the quagmire of life to reach the other side of who knows where.
Shop at Amazon
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
CoN73mP7
Posts: 37
Joined: Wed May 18, 2011 7:48 am
OLAP Product: TM1
Version: 9.5
Excel Version: 2003
Location: Stuttgart, Germany
Contact:

Re: Creating a cube with a variable number of Dimensions

Post by CoN73mP7 »

I think we are talking about different things.

I DO NOT have an existing cube.

I have created dimensions and in the next step want to create a cube with them. The only problem: I don't know how many dimensions when writing the process.
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: Creating a cube with a variable number of Dimensions

Post by David Usherwood »

Given you have a relational source, would a sensible approach be to write a DISTINCT query of some kind to give you the _names_ of the dimensions, and use that to populate the parameters of CubeCreate? But you'd probably need to have a set of IFs matching to each of the _dimensionality_ possibilities ie if you have 10 dimensions, cubecreate with 10 values, etc. Sounds quite messy to me.
To be really fancy you could look at Steve Rowe's use of Expand in the Hints and Tips. But it sounds to me as if the requirement which has come to you needs challenging.
CoN73mP7
Posts: 37
Joined: Wed May 18, 2011 7:48 am
OLAP Product: TM1
Version: 9.5
Excel Version: 2003
Location: Stuttgart, Germany
Contact:

Re: Creating a cube with a variable number of Dimensions

Post by CoN73mP7 »

Thanks for your answer, I've got no problems with the names of the dimensions. I could pass them as parameters. But I don't know the number of dimensions. I'm building about a hundred cubes with different count of dimensions. i can't make a process for each number of dimensions.
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: Creating a cube with a variable number of Dimensions

Post by David Usherwood »

No....
But you can build a process which has a cubecreate command for each _number_ of dimensions with which you need to work, and wrap IF tests round them
We've had to do this many times in the past, when writing generic version rollover TIs - CELLPUTNs for each cube. At least in that case we had the cubes so could find out the dimension count.
If you can generate a query with the cube and dimension names I can't see an issue with a set of CUBECREATES based on how many dimensions you need. You could even add the dimension count in your query :)
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: Creating a cube with a variable number of Dimensions

Post by paulsimon »

Hi

The nested IF approach in TI is the one I would go for.

Other approaches include the use of the TAB_CREATE16 macro from VBA or the use of the TM1 API be it VB, C or Java.

The requirement to be able to create multiple cubes all with different numbers of dimensions does strike me as a little unusual. Are you writing some sort of generic production deployment tool?

Regards

Paul Simon
Post Reply