Here is an example to transfer data between TM1 Instances byTM1RunTI configuration file and some tips for trouble shooting.
TM1RunTI is a command line interface tool that can initiate a TM1 TurboIntegrator (TI) process from within any application capable of issuing operating system commands. That means it can be called cross TM1 Instance, especially when you want to exchange data between instances.
Suppose there are two TM1 Instance A and B. Now we want to transfer data from A to B. The TI in instance B will be called by TI in instance A, so the data can be loaded into instance B.
TM1RunTI Configuration File
TM1RunTI can function with or without a configuration file. If a configuration file is specified, its parameters will be read first. To simplify the command line, we set a configuration file here. For TM1RunTI command line syntax you can check TM1 official document here.
This example shows [TM1RunTI] section and [Connect] section. We should set the TI we want to call in instance B and connection of instance B. TM1RunTI command execute in instance A.
[TM1RunTI]
process= REP_Import_Test
connect=DEV
[Connect – DEV]
adminhost=10.2.1.126
Server=Instance_B
user=admin
passwordfile=F:\TM1_Servers\Target\Scripts\bds.out
passwordkeyfile=F:\TM1_Servers\Target \Scripts\bds.key
TM1RunTI execution
TM1RunTI executes from within a TurboIntegrator process using ExecuteCommand() in instance A, and Run_TI is created for execution. The configuration file path, file name, and tm1runti installed path in TM1 server should be specific. The Run_TI process can be called in others TI.
Run_TI process:
vConfigFilePath = CellGetS(cCube, ‘tm1runti Config File Path’, ‘String’);
vINI= CellGetS(cCube, ‘tm1runti Config File Name’, ‘String’);
vtmti = CellGetS(cCube, ‘tm1runti Path’, ‘String’);
vCommand = vtmti | ‘ -i ‘ | vConfigFilePath | vINI;
ExecuteCommand(vCommand, 0);
Here are the command executed: “E:\Program Files\ibm\cognos\tm1_64\bin64\tm1runti” -i F:\TM1_Servers\Target\Scripts\test.ini
Troubleshooting
For some reasons, TI in target server doesn’t run, but Run_TI always returns successfully. That’s because executing TM1RunTI directly from within a TurboIntegrator process using ExecuteCommand() has an important limitation. TM1RunTI returns an error code if it fails, but the ExecuteCommand() does not return the error code and there is no other mechanism in TurboIntegrator to access the return code after the call.
Here are the tips for trouble shooting:
- Check the message log in target server to see if the target TI runs or not.
- If it is not, please execute the command in TM1 server command line to see the error message. It might be password expired or someone changed the password, but we can’t see the error message in TM1 log file.
- If the call is successful, please check the target TI in configuration file to make sure the TI name is correct and it is excepted target TI.
Reference
For more detail, you can check TM1 official document: