IBM Cognos Proven Practices: Creating a Summary Cube for TM1 Data Reservations

Nature of Document: Tip or Technique; Product(s): TM1 9.5.2; Area of Interest: Development

This article describes a method to create a cube listing all the data reservations on all available cubes in a TM1 server.

Sameer Inamdar, Software Engineer, IBM

Sameer InamdarSameer Inamdar is a Software Engineer working for IBM India Software Lab for the last two and half years. He is currently working on customer centric issues on various products like TM1, Cognos BI, Cognos Insight etc.



08 July 2011

Also available in Chinese

Introduction

Purpose

Data Reservation is the new feature added in TM1 9.5.2 and onwards. Data Reservation (DR) is used to reserve regions of a cube by a particular user. Once reserved, a region can only be modified by that user. So it is often necessary to know which users have data reservations on which cubes. This article describes a method to create a cube listing all the data reservations on all available cubes in a TM1 server.

Applicability

TM1 9.5.2


Creating a Summary Cube Using TurboIntegrator

You can build a cube called “DRsummary” using a TurboIntegrator. All you need to do is create a TurboIntegrator process and run it. This process will create the DRsummary cube listing all the data reservations made by users in a TM1 server.

Dimensions of the DRsummary Cube

There are only two dimensions present in the DRsummary cube. You don't need to create them manually. This cube uses Control Object dimensions which are already present in every TM1 server. These dimensions are viewable in TM1 Architect by navigating to the View option on the Main Menu and selecting Display Control Objects. The two dimensions are:

  • }Clients
  • }Cubes

Illustration 1 shows the elements within the Control Object dimensions for the Planning Sample TM1 Server. The image shows two TM1 Architect Subset Editors open side-by-side listing the dimension items in these two Control Object dimensions.

Illustration 1: This image shows the Control Object dimensions }Clients and }Cubes
Illustration 1: This image shows the Control Object dimensions }Clients and }Cubes

Creating the TurboIntegrator Process

To create the TurboIntegrator process follow the procedure listed below.

  1. Create a TurboIntegrator process with a Datasource Type of None.
  2. Copy and paste the following code into the Prolog procedure of the process.
    #****Begin: Generated Statements***
    #****End: Generated Statements****
    
    #If DRsummary cube already exist delete it.
    IF(CubeExists('DRsummary') = 1);
    CubeDestroy('DRsummary');
    ENDIF;
    
    CubeCreate('DRsummary','}Clients','}Cubes');
    
    #Getting no. of elements present in }clients and }cubes dimension
    
    no_user = DIMSIZ('}clients');
    no_cubes = DIMSIZ('}Cubes');
    cube_counter = 1;
    user_counter = 1;
    
    
    vIndex = 1;
    vDelim = '|';
    
    WHILE(user_counter <= no_user);
    user=DIMNM('}Clients',user_counter);
    
    
    cube_counter = 1;
    WHILE(cube_counter <= no_cubes);
    
    #If it is a control cube then it is skipped
    cube_name = DIMNM('}Cubes',cube_counter);
    var1 = scan('}',cube_name);
    
    if(var1<>1);
    vAddress = CubeDataReservationGet(vIndex,cube_name,user,'|');
    
    CellPutS(vAddress,'DRsummary',user,cube_name);
    
    
    endif;
    cube_counter= cube_counter + 1;
    
    END;
    user_counter = user_counter +1;
    
    END;

DRsummary Cube Build Results

After executing this process you are presented with a list of cubes on the TM1 Server (columns) and the TM1 Server users (rows). Each cube that is reserved will be displayed with an entry showing a timestamp when the reservation occurred and the region of the reservation (if applicable) in a new cube called DRsummary.

Illustration 2 shows the resulting Drsummary cube, the rows list the TM1 users and the columns list the application cube names. If there is a value in an intersecting cell then then that means there is a data reservation currently applied to that cube by the user in that row. The cell entry also contains a Time Stamp when the data reservation was applied, along with the data range of the reservation.

Illustration 2: This image shows the resulting Drsummary cube which displays all the current data reservations on a TM1 Server
Illustration 2: This image shows the resulting Drsummary cube which displays all the current data reservations on a TM1 Server

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Big data and analytics on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Business analytics, Information Management
ArticleID=710746
ArticleTitle=IBM Cognos Proven Practices: Creating a Summary Cube for TM1 Data Reservations
publish-date=07082011