Creating a }Picklist cube in a TI process

Post Reply
User avatar
Harvey
Community Contributor
Posts: 236
Joined: Mon Aug 04, 2008 4:43 am
OLAP Product: PA, TM1, CX, Palo
Version: TM1 8.3 onwards
Excel Version: 2003 onwards
Contact:

Creating a }Picklist cube in a TI process

Post by Harvey »

Hi all,

I'm trying to create a picklist cube for an existing cube using a Turbo Integrator process.

I'm creating a cube with the correct name (}Picklist_Cube_Name) with the same dimensionality as the original cube with the addition of the }Picklist dimension as the final dimension. I'm then attaching a rule to the picklist cube using the RuleAttach TI function.

The code is a little complex, but a simplified version would look like this (given an existing cube called "Cube001" with 3 dims):

Code: Select all

sD1 = "dim1';
sD2 = "dim2';
sD3 = "dim3';

sTargetCubeName = 'Cube001';
sPicklistCubeName = '}Picklist_' | sTargetCubeName;
sPicklistDimensionName = '}Picklist';

## Assume this file exists and contains valid picklist rules!
sPicklistRuleFile = '..\source\Cube001_Picklist.txt';

IF(CubeExists(sPicklistCubeName) = 1);
	CubeDestroy(sPicklistCubeName);
ENDIF;

CubeCreate(sPicklistCubeName, sD1, sD2, sD3, sPicklistDimensionName);
RuleLoadFromFile(sPicklistCubeName, sPicklistRuleFile);
This code creates a valid picklist cube with the rule attached, but unfortunately, the picklist only shows up in the target cube after I re-start the server.

I've tried unloading the cube, and selecting "Create Picklist Cube" in architect, but neither work. I don't think the issue is with the structure of the picklist cube itself, since it does work once the server is re-started.

Has anyone tried this? Is there a trick I can use to refresh the picklists once the picklist cube is created? Any help would be appreciated!

Cheers,
Harvey.
Take your TM1 experience to the next level - TM1Innovators.net
User avatar
Elessar
Community Contributor
Posts: 391
Joined: Mon Nov 21, 2011 12:33 pm
OLAP Product: PA 2
Version: 2.0.9
Excel Version: 2016
Contact:

Re: Creating a }Picklist cube in a TI process

Post by Elessar »

Hi,

Try to call SaveDataAll in epilog
Best regards, Alexander Dvoynev

TM1 and Data Science blog: 7th article - Development requirements.
User avatar
Harvey
Community Contributor
Posts: 236
Joined: Mon Aug 04, 2008 4:43 am
OLAP Product: PA, TM1, CX, Palo
Version: TM1 8.3 onwards
Excel Version: 2003 onwards
Contact:

Re: Creating a }Picklist cube in a TI process

Post by Harvey »

SaveDataAll doesn't seem to make any difference.

What I have discovered is that the picklist works the first time the cube is created, but once it's established I can't delete it and re-create the picklist cube.

For now I'm just going to leave it if it already exists and replace the rule file. That will work well enough for my purposes.

I would still like to know the answer if there is one, though.
Take your TM1 experience to the next level - TM1Innovators.net
babytiger
Posts: 78
Joined: Wed Jul 31, 2013 4:32 am
OLAP Product: Cognos TM1, EP, Analyst
Version: 10.2.2
Excel Version: 2013
Location: Sydney AU

Re: Creating a }Picklist cube in a TI process

Post by babytiger »

Have you tried unloading picklist target cube, and then reload the target cube (create a one cell cube view and access it).

Suspect there is a cube dependency on picklist cubes. Destroying the picklist cube may have removed this dependency.
MK
Post Reply