Page 1 of 1
TI Process code snippet - Cache views for users
Posted: Wed Sep 16, 2009 7:15 am
by shockwave
HI All,
Does anyone have some handy code in TI that I can kindly steal

). 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
Re: TI Process code snippet - Cache views for users
Posted: Wed Sep 16, 2009 7:32 am
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.
Re: TI Process code snippet - Cache views for users
Posted: Thu Sep 17, 2009 8:53 am
by shockwave
Thanks Steve! Too easy. I have yet to test it but, will this really cache it for all users?
Re: TI Process code snippet - Cache views for users
Posted: Thu Sep 17, 2009 8:55 am
by shockwave
ignore last post.