TM1 Tutorials.com

Implementing TM1 since 2005

  • Home
  • CubeSpy TM1 Monitor
  • Share Your Knowledge!
RSS
Tag Archives: TurboIntegrator

How to write easily understood Turbo Integrator code

Posted on March 7, 2013 by Ivan Kulman
4 Comments

As many of TM1 consultants know, reading TI code always has the possibility of being a tricky task – especially if it is someone else’s code. This is mostly due to TM1 Perspectives Turbo Integrator lacking Syntax Highlighting (See our Notepad++ highlighter) but in part it is due to poor variable naming, indenting, casing or things simply not developed consistently throughout the model. Read more …

Categories: IBM Cognos TM1, TM1 10.1, TM1 pre 10.1, Training Material | Tags: IBM Cognos TM1, TI Process, Turbo Integrator, TurboIntegrator

Creating a Time Dimension

Posted on June 5, 2012 by Ben Hill
No Comments

This post should really be titled “Creating a Time Dimension with a method which allows it to be easily expanded later.” but that simply wont fit. The concept is simple, where previously a time dimension is manually updated and eventually becomes tiresome to update (once every few years) we can instead use one process to create the dimension and for each year call another process which added the year its given, its quarters and months along with aliases and attributes. This way, in 2 years time the dimension can be expanded simply by running the second process and providing the years to add as parameters.

The reason this sample dimension has no alternate hierarchies is because this example was taken from a system in-which the time dimension was to be consumed via Cognos Express Reporter.

Process 1: Meta Time Pt1

  • Creates the Dimension
  • Adds the Name Alias
  • Sets the Sort Order (In the Attachment, not reflected in screenshots)
  • Calls the 2nd process for the years to be added by default

Process 2: Meta Time Pt2

  • Adds the Quarter Elements
  • Adds the Month Elements
  • Adds the Names on the Quarters
  • Adds the Names on the Months

Download Here: Time Dimension Process Samples (.zip)

Turbo Integrator Process 1
Turbo Integrator Process 2 - Parameters

Turbo Integrator Process 2 - Prolog
Turbo Integrator Process 2 - Epilog


 

 

Categories: Code Sample - Downloadable, IBM Cognos TM1, TM1 pre 10.1, Training Material | Tags: Code Download, DimensionElementComponentAdd, DimensionElementInsert, IBM Cognos TM1, TI, Time Dimension, TurboIntegrator

How to Import all Files in a Directory

Posted on October 24, 2011 by Ben Hill
2 Comments

We’ve recently been on a Property Management project using TM1 to deliver a Management, Planning and Reporting Solution. The Client has properties which are managed by an external property manager who produces tenancy schedules and general ledger reports for data consumption.

The Problem:

Every properties reports would come from the external property manager in a different file. Making the process to load these into TM1 only mildly faster than using Excel as a solution.

The Solution:

A small script was developed which lists the files from a given directory into a text file for consumption by a “Master” TI Process which then calls another “Child” TI Process for each file, giving the filename and path as a parameter each time.

The “Master” TI Process’ data source is the generated list of files and in the prolog it would run the script over the provided directory (via a parameter variable). This ensures the list of files is up to date.

The “Child” TI Process dynamically sets the datasource to the filename and path provided as a parameter. As the load is accumulative, the section of the cube (a property specific slice) being loaded needs to be cleared before each load to prevent data doubling up. This was further complicated by the fact that the property could not be determined by the name of the file. The clear out was achieved by reading the first line of the datasource file and retrieving the Property Identifier from it, thus performing the Zero Out in the Metadata Tab.

Download Here: makeListOfFoldersFiles.zip

Script Usage:

*PathToScript*\makeListOfFoldersFiles.vbs "*PathToFolder*" "*PathToOutputTextFile*"

Example:

C:\makeListOfFoldersFiles.vbs "C:\TM1s\PropertyModel\Data Files\Oct 2011\" "C:\TM1s\PropertyModel\Data Files\files.txt"

There is additional scripting required when then using this within a TI Process:

Executing the Script from a TI Process: (Prolog)

sExec = 'CScript  D:\blat\full\makeListOfFoldersFiles.vbs "' | pFolder | '" "C:\TM1s\PropertyModel\Data Files\files.txt"';
EXECUTECOMMAND(sExec,1);

This will execute the Script listing the files held within the folder path stored in the parameter variable “pFolder” and write this list to the specified path, which is also the datasource path for this process. Within the Data Tab of the process the “Child” process is called using the “EXECUTEPROCESS” function passing the filename as a parameter. Lastly the “DataSourceNameForServer” Local variable is used within the prolog of the “Child” Process to set the given filename as the datasource to be imported.

Categories: IBM Cognos TM1 | Tags: ExecuteCommand, ExecuteProcess, IBM Cognos TM1, TI Process, TurboIntegrator, VBScript

Nightly TM1 Backups

Posted on October 4, 2011 by Ben Hill
2 Comments

All data pertaining to a TM1 server is typically held in a single folder we call the Data Directory. We recommend you backup this folder at the very least weekly. Although most servers have automatic backups owned by the IT Department it can be beneficial to have an archive backup (*.zip file) taken regularly which enables (subject to licenses) a TM1 Administrator to run a backup in parallel with their production server for the purpose of restoring data without engaging the IT Department.

Requirements:

  • Download: Command Line version of 7-Zip found here: http://www.7-zip.org/download.html
  • Access to the Server Running TM1

Theory:

An optimal solution puts TM1 in charge of the Archival process enabling TM1 developers and administrators to Backup the server from the TM1 Frontend prior to development or data loads etc. As such its a logical fit that the Archive Process be executed from a TI Process. The 7-Zip Command Line interface provides this flexibility when combined with the TI Processes EXECUTECOMMAND function.

Note: 7-Zip is a Commercially Free File Compression Application/Library.

Below is a sample of using this methodology, the path variables will need to be updated when it is initially setup but the basics should remain the same. This will create a backup archive with a Date and Time Stamp to differentiate if from other backups.

SaveDataAll();
sExec = 'D:\archiver\7za.exe';
sBackupDir = 'D:\TM1Servers\Finance\Backups\';
sDataDir = 'D:\TM1Servers\Finance\Data\';

sFileName = 'Data ' | TIMST(NOW(), '\Y\m\d \h.\i', 1) | '.zip';
sArgs = ' a -tzip ';
sCommand = sExec | sArgs | '"' | sBackupDir | sFileName | '" "' | sDataDir | '*"';
EXECUTECOMMAND(sCommand,0);

Note: This process does not wait for the command to finish before proceeding, this is simply so that TM1 doesn’t wait unnecessarily.

For simplicity sake the following lines need to be updated when this system is implemented on your site:

  • sExec = ‘D:\archiver\7za.exe’; (The path to the 7-Zip Command Line Executable)
  • sBackupDir = ‘D:\TM1Servers\Finance\Backups\’; (The Path to the Destination Directory)
  • sDataDir = ‘D:\TM1Servers\Finance\Data\’; (The Path to the TM1 Server’s Data Directory)

 

TM1 Data Directory Archives

 

An Extract form the 7-Zip License File:

Notes: You can use 7-Zip on any computer, including a computer in a commercial organization. You don't need to register or pay for 7-Zip.
Categories: IBM Cognos TM1 | Tags: 7-Zip, Backup Process, IBM Cognos TM1, Nightly Backups, TI Process, TM1 Archive, TM1 Backup, TM1 Command Line, TurboIntegrator
  • Authors Profiles

    Regular Authors:







    Guest Authors:
  • TM1 Tutorials Pages

    • CubeSpy TM1 Monitor
    • Share Your Knowledge!
  • Recent Posts

    • IBM Cognos TM1 and Express Monitoring
    • IBM Cognos Users – Have your say! (BI Survey 2013)
    • InfoCube Spark v1.2 – TM1 Minor Error Logs
    • InfoCube Spark – An Introduction
    • Woohoo! TM1 Tuts has cracked 100,000 visits!
    • Your Lifeline, The TM1 Transaction Log
    • Creating basic Top 10 reports using MDX expression
    • How to write easily understood Turbo Integrator code
    • Broken Transaction Log?
    • Removing old TM1 Servers from “Services”
    • Turbo Integrator Syntax Highlighter (Notepad++)
    • Messaging users of IBM Cognos TM1
    • Back to Basics – Regions in Rules
    • Cognos Insight – Aligning using the Grid
    • Automating Data Transfers between TM1 Servers
  • TM1 Tutorials Links

    • Analytics Zone for all things about Cognos Insight and a free trial version.
    • InfoCube Premier Management Consulting on Cognos Products
    • Report Ready – and Waiting! Report Distribution Management – Track PDF Report Consumption by Channel
    • TM1 Networking – Sydney Meetup The meetup group for TM1 in Sydney, Australia
    • TM1 Tutorials on LinkedIn
    • TM1 Tutorials on Twitter Us on Twitter!
    • TM1 Tutorials.com Our primary home on the interwebs
  • Twitter Roll

    Error: Twitter did not respond. Please wait a few minutes and refresh this page.

  • Tags

    Active Form Analysis Assistance Big Data Budgeting Cognos Cognos Insight Cognos TM1 Comparative Analysis Corporate Planning CubeSpy Dashboard dynamic reporting ETL Excel ExecuteProcess IBM Cognos IBM Cognos Express IBM Cognos Insight IBM Cognos TM1 Implementing TM1 InfoCube Spark Installation Guide MDX NT Service Server Monitor Statement of Work TI Process TM1 TM1 10.1 TM1 Consultants TM1 Cube Rules TM1 Development TM1 Installation TM1 Server TM1 Software TM1 Training TM1 Tutorial TM1 Web TM1Server.log Transaction Log TurboIntegrator Turbo Integrator VBScript Wim Gielis
© TM1 Tutorials.com. Proudly Powered by WordPress | Nest Theme by YChong