Here you will learn about TurboIntegrator (TI), data sources available with TI, various tabs, local variables, order of operations within the TI process, functions, cube logging and more.
7.7 K Views
What is TurboIntegrator (TI)?
TM1 TurboIntegrator is the programming or scripting tool that allows you to automate data importation, metadata management, and many other tasks.
Data sources available with TurboIntegrator
Using TurboIntegrator, you can import data from the following data sources:
Industry standard comma-delimited (CSV) text files including ASCII files
Information stored in relational databases (accessible through an ODBC data source)
Other OLAP cubes, including Cognos TM1 cubes and views.
Microsoft Analysis Services
SAP via RFC, creating TI processes
To create a new TI script you can use TM1 Server Explorer. You have to just right-click on Processes and then select Create New Process. TM1 then opens the TurboIntegrator dialog showing a new, blank process ready for your code.
Within the process, there will be five visible tabs:
The Data Source tab
The Variables tab
The Maps tab (this tab is initially grayed out)
The Advanced tab
The Schedule tab
The Data Source tab
You can use the Data Source tab to identify the source from which you want to import data to TM1.
The Variables tab
The concepts of database table columns or file fields are handled in the TI Variables tab. If the process has a data source defined, each column in that data source will become a variable in the Variables tab.
Important facts on the Variables tab include:
Be sure to verify the variable type of each and every variable. TM1 will make assumptions about your data which are not always correct. A string, which has numeric data in it, will be initially defined as numeric by TM1.
The order of the variables in the Variables tab is really irrelevant to your scripting. For example, a CellPutN function that you code need not have variables in the same order as which appears in the variables list. The CellPutN function needs the variables in the order of the cube’s dimensions.
A variable is the name of a specific value. You can use the variable’s value in any way you need to; write it to a cube, use it as an element name, write it to a text file using the ASCIIOutput function, or whatever you want.
TM1 will show sample data from the data source in the Variables tab but only if TI is currently connected to the data source.
The following are the key facts to know about this tab:
The Element Variable column shows the name of the variable defined on the Variables
The Sample Value column is for information only.
The Dimension column is dependent on the value you select for its Action
The Order In Cube column only applies if you specify Create or Recreate a cube on the Cube
The options in the Action column are Create, Recreate, Update, and As Is.
The As Is action will use the elements that already exist in the specified dimension. If a variable contains an element name which currently does not exist in the dimension, you will get an error when you run the process.
The Element Type column indicates if the element is numeric or string.
You can order the elements in the dimension using the Element Order
The Advanced tab
All TI processes give you the ability to provide runtime parameters.
TI processes also include several procedures tabs. They are as follows:
Order of operations within a TurboIntegrator process
When you run a TI process, the procedures are executed in the following sequence: Prolog, Metadata, Data, and Epilog (basically left to right as they are displayed).
The Prolog is executed only one time.
If the data source for the process is None; Metadata and Data are disabled and do not execute.
If the data source for the process is None; Epilog executes only one time, immediately after the Prolog finishes processing.
If the data source for the process is not None, Metadata and Data will execute for each record in the data source.
Code to build or modify a TM1 dimension resides in the Metadata
The Metadata tab is used to build TM1 subsets.
All lines of code in the Metadata procedure are sequentially executed for each record in the data source.
All lines of code in the Data procedure are sequentially executed for each record in the data source.
The Data procedure is executed for each row or record in the data source when an error is generated in the procedure for multiple times.
The Data procedure is the procedure used to write/edit code used to load data into a cube.
The data source is closed after the Data procedure is completed.
The Epilog procedure is always the last procedure to be executed
Not all TM1 functions will work as expected in every procedure. For example, the DimensionElementInsert function is a TI function that can only be used in the Data or Epilog procedures of a process.
The Schedule tab
The Schedule tab allows you to schedule a process to execute at regular intervals. Keep the following in mind about the Schedule tab:
You can use the calendar to select a start date for the process.
Processes can be set with a frequency granularity of seconds, minutes, hours, or days.
Parameters can be provided which are available to the process every time it runs.
You can supply a name for the Chore that will run your process (it does not have to have the same name as the process itself).
String lengths limit in TurboIntegrator
Remember that TI is capable of handling string data in sizes of up to 8000 bytes characters at a time.
Process function names such as CellPutN or ASCIIOutput
Implicit variable names such as DatasourceASCIIDelimiter
TI keywords such as If and While
AsciiOutput: This function writes a comma-delimited record to an ASCII file.
AttrPutN and AttrPutS: These functions assign a value to a numeric or string element attribute.
CellGetN, CellGetS, CellPutN, and CellPutS: These functions retrieve (or update) values from (or to) a numeric or string cube cell.
CellIsUpdateable: This function lets you determine whether a cube cell can be written or not. The function returns 1 if the cell can be written, otherwise it returns 0.
DimensionElementInsert and DimensionElementDelete: These functions add or delete an element to or from a dimension.
DimensionElementComponentAdd and DimensionElementComponentDelete: These functions will add or delete a component (child) to or from a consolidated element. You cannot use this function in the Epilog procedure of a TI process.
ExecuteProcess: This function lets you execute a TI process from another process.
ItemSkip: This function forces a process to skip the current data source item.
ItemReject: This function rejects a source record and places it in the error log, along with a specified error message.
If and While: The If statement allows a process to execute a statement or series of statements when a given expression is true, and while allows a process to repeat a series of statements when a given condition is true.
ProcessQuit: This function terminates a TI process.
SecurityRefresh: This function reads all the security control cubes and regenerates the internal structures in the server that are used by TM1 API functions.
SaveDataAll: This function saves all TM1 data from the server memory to disk and restarts the log file.
SubsetCreate and SubsetDestroy: These functions create or destroy a public subset of a specified dimension.
ViewCreate and ViewDestroy: These functions create or destroy a view of a specified cube.
TM1 can keep a record of all data changes made to a cube. If the server stops unexpectedly, TM1 can use this logged record of changes to recover upon startup.
The logging element indicates whether logging is enabled for a given cube. When cube logging is enabled, the value of this property is Yes, otherwise the value is No.
By default, TM1 logs transactions to all cubes which are loaded on the server.