AddCubeDependency
AddCubeDependency lets you predefine cube inter-dependencies to avoid lock contention problems during normal system use.
In normal operations, cube dependencies are established when data which crosses cube boundaries (such as data that is derived by a rule that references an external cube) is retrieved. To create the dependency information, the server must lock the cubes while the dependency is established, potentially maintaining the lock during a long view calculation. Since this is a 'write' lock, other users are prevented from accessing the cubes. The AddCubeDependency function allows the dependency to be established when the server starts up, preventing later lock contention as no new dependency need be established.
This function is valid in TM1® TurboIntegrator processes only.
Syntax
AddCubeDependency(BaseCube, DependentCube);
|
Argument |
Description |
|---|---|
|
BaseCube |
The name of the cube upon which the DependentCube is dependent. |
|
DependentCube |
The name of a cube that depends on another cube (BaseCube) for data. Most commonly, this would be a cube that uses rules to pull data from an external cube. |
Example
Consider a cube named 'SalesCube' that includes the rule ['net']=!Units * DB('PriceCube',
... );
In this example, 'SalesCube' is the dependent cube, as it is dependent on values in the base cube
named 'PriceCube' to calculate the value of 'net'. To establish this dependency, you should run the
following function in a TurboIntegrator process: AddCubeDependency( 'PriceCube', 'SalesCube'
);
To establish dependency at server load time, you can create a process that runs the
AddCubeDependency function, schedule the process as a chore, and then define that
chore as one of the StartupChores in Tm1s.cfg.