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.
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:
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
Creating the TurboIntegrator Process
To create the TurboIntegrator process follow the procedure listed below.
- Create a TurboIntegrator process with a Datasource Type of None.
- 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
Dig deeper into Business analytics on developerWorks
Experiment with new directions in software development.
Tips for improving outcome and controlling risk.
Software development in the cloud. Register today and get free private projects through 2014.
Evaluate IBM software and solutions, and transform challenges into opportunities.