Blog | Octane Software Solutions

How to Implement Parallel Interaction in TM1

Written by Swetha DC | September 28, 2017

With today's increase in data volumes it is becoming more important to handle the high demand (either loading or accessing) of data conccurrently or in parallel. This blog will assist you by noting the benefits, enabling the functionality, as well as giving you an example.

Let's start with the what parallel interaction / concurrency is and it benefits:

  • It's a IBM server feature allowing concurrent operations (read/write).
  • The concurrency operations can be performed on the same cube object.
  • Writing to a cube will not lock it. This means that it will not wait for readers using the same cube to finish their read operation.
  • It enabes the execution of read and write operations at same time.
  • Data spreading over the high-level element will be faster.
  • Freshly entered data retrieval will be faster for the users

So to implement we can segregate the implementation into two sections,

  1. cfg changes
  2. Running TI using Command line interface

 Configuration Changes

 Enable the parameter- ParallelInteraction in tm1s.cfg

  • By default, parameter value set to F(FALSE)
  • Enable the parameter by setting values as T(True)
    • ParallelInteraction=T
  • By enabling the Parallel interaction, that enables parallel interactivity for all the cube

Running TI using Command line interface

 

  • By using TM1RunTI, we can trigger TI process from command prompt
  • TM1RunTI execution can be done both synchronous mode or an asynchronous mode
  • In synchronous mode, TM1RunTI trigger the TI process and wait for TI to return the control over the TM1RunTI
  • In asynchronous mode, TM1RunTI trigger the TI process, once after the TI execution started, it returns the control over to TM1RunTI
  •  

Example

In this example data will be loaded to different years of same cube at the same time.

Parallel Interaction is best illustrated while using TM1RUNTI function to load data into a cube for different years.

Now assume that loading data into TM1 for a year is taking a long time as there are billions of records and has complex logic in TI process.

The time taken while loading data into TM1 can be reduced to almost 1/12 of the time, by parameterizing the process to load by month and using parallel interaction i.e., using TM1RUNTI

 

Syntax and the usage of TM1RUNTI.

Syntax:

If you are confused on the command prompt parameters. Follow the procedure below.

Open the Command Line. Here, change the directory to the Cognos_TM1\bin folder (where TM1 is Installed) and enter the following command as shown in screenshot:

tm1runti -?

Usage:

vCommand = ‘d:\Program Files\ibm\cognos\tm1_64\bin64\tm1runti.exe -process zz_Summary_Load pMonth="Jan" pView = “JanView” -adminhost localhost -server SData -user admin -pwd "apple" ‘ ;

In the above command line, we have used hardcoded user name and password. We can also use Password file which is encrypted.

Syntax when using Password file

vCommand = ‘d:\Program Files\ibm\cognos\tm1_64\bin64\tm1runti.exe -process zz_Summary_Load pMonth="Jan" pView = “JanView” -adminhost localhost -server SData -user "admin" -passwordfile "D:\Program Files\ibm\cognos\tm1_64\bin64\cfmcognosprk.dat" -passwordkeyfile "D:\Program Files\ibm\cognos\tm1_64\bin64\cfmcognoskey.dat"

when we need to run the above command in TM1, we can use a function ExecuteCommand in TI Process.

Create a TI Process. Here created a process as zz_TM1RUNTI

ExecuteCommand(vCommand, 0);

From the command line specified above zz_Summary_Load loads into a cube using month as a parameter. To make process run in parallel one must be sure that Process is using different views to avoid locking.

When process is executed, even process completed successfully from the below screenshot. The process which is executed in command line is triggered through command inline interface of TM1. Which can be seen running parallel in TM1TOP as shown below.

 

 

 

 

I hope you've found this useful and be sure to sign up below for updates from the comments section OR sign up to our blog for all the latest and greatest.

For more great content click here