TI Process code snippet - Cache views for users

Post Reply
shockwave
Posts: 88
Joined: Mon Dec 15, 2008 10:45 am
OLAP Product: TM1
Version: 9.1.3
Excel Version: 2003 SP3

TI Process code snippet - Cache views for users

Post by shockwave »

HI All,

Does anyone have some handy code in TI that I can kindly steal :o). I have some default views that I would like to cache for all users first thing in the morning after reboot of server. Some of the views are kind of slow when opening it for the first time.

Cheers

Shock
User avatar
Steve Rowe
Site Admin
Posts: 2456
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: TI Process code snippet - Cache views for users

Post by Steve Rowe »

Hi shock,

I think you just need the ViewConstruct TI function, there's no great complexity here??

From the help file

ViewConstruct
This is a TM1 TurboIntegrator function, valid only in TurboIntegrator processes.
This function constructs, pre-calculates, and stores a stargate view in memory on a TM1 server.
This function is useful for pre-calculating and storing large views so they can be quickly accessed after a data load or update.
Syntax
ViewConstruct(CubeName, ViewName);
Arguments
CubeName The cube from which you want to construct the view.
ViewName The view you want to construct. This view must be an existing public view on the server.

Example
ViewConstruct('99sales', '1st Quarter Actuals')
This example generates and stores the data for 1st Quarter Actuals, which is a public view of the 99sales cube.
Technical Director
www.infocat.co.uk
shockwave
Posts: 88
Joined: Mon Dec 15, 2008 10:45 am
OLAP Product: TM1
Version: 9.1.3
Excel Version: 2003 SP3

Re: TI Process code snippet - Cache views for users

Post by shockwave »

Thanks Steve! Too easy. I have yet to test it but, will this really cache it for all users?
shockwave
Posts: 88
Joined: Mon Dec 15, 2008 10:45 am
OLAP Product: TM1
Version: 9.1.3
Excel Version: 2003 SP3

Re: TI Process code snippet - Cache views for users

Post by shockwave »

ignore last post.
Post Reply