bool UpdCubeCache(CubeId tCube, UpdCubeCacheArg tArg)
tMon. Cube moniker.
tArg. Operation execution parameters.
The UpdCubeCache operation creates a new or updates the existing In-Memory cache for the specified cube.
The operation creates a new cache or updates existing files of In-Memory cache of a cube on the BI server, which is used for work. On an attempt to execute several cache updates at the same time for the same cub, the operations are executed one by one. Cache update is executed by the specified cube selection (the tArg.sels field) and for the specified cube display version (the tArg.dest field). The operation returns True if the update is successful, and False if the update returns some errors.
NOTE. To provide correct work of the operation, cache files should be used only by the current server.
{
"UpdCubeCache" :
{
"tCube" :
{
"id" : "S1!M!S!C1"
},
"tArg" :
{
"sels" :
{
"it" :
[
{
"k" : "5858",
"id" : "FACTS",
"sel" :
{
"elSelectOp" : "Select",
"elRelative" : "All"
}
},
{
"k" : "112",
"id" : "CALENDAR",
"sel" :
{
"elSelectOp" : "Unknown",
"elRelative" : "Unknown",
"setCalendarPeriod" :
{
"active" : "true",
"start" : "2000-01-01",
"end" : "2000-12-01",
"levels" :
{
"it" : "Quarter"
},
"append" : "false",
"findOutActive" : "false"
}
}
},
{
"k" : "116",
"id" : "DIM_1",
"sel" :
{
"elSelectOp" : "Select",
"elRelative" : "All"
}
},
{
"k" : "991",
"id" : "DIM_2",
"sel" :
{
"elSelectOp" : "Select",
"elRelative" : "All"
}
}
]
},
"dest" :
{
"@type" : "q1:CubeDest",
"k" : "1",
"id" : "STD_CUBE",
"n" : "Cube",
"vis" : "true",
"isDefault" : "true",
"hideTrivialFactDimension" : "false",
"selSetOriginalOnly" : "false",
"useMultiAttrTable" : "false",
"datasets" :
{
"its" :
{
"it" :
[
{
"k" : "5878",
"id" : "OBJ5877",
"n" : "Table",
"vis" : "true",
"aggrType" : "Server",
"useSubqueryOptimization" : "true"
}
]
}
},
"dims" :
{
"its" :
{
"it" :
[
{
"k" : "5858",
"id" : "FACTS",
"n" : "Facts",
"vis" : "true",
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "false",
"@isLink" : "false",
"@ver" : "1",
"@hf" : "false",
"i" : "FACTS",
"n" : "Facts",
"k" : "5858",
"c" : "1028",
"p" : "5857",
"h" : "false",
"hasPrv" : "false",
"ic" : "false"
},
"aggsPresent" : "false",
"hierAggsPresent" : "false"
},
{
"k" : "112",
"id" : "CALENDAR",
"n" : "Calendar",
"vis" : "true",
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "false",
"@isLink" : "false",
"@ver" : "6",
"@hf" : "false",
"i" : "CALENDAR",
"n" : "Calendar",
"k" : "112",
"c" : "1026",
"p" : "103",
"h" : "false",
"hasPrv" : "false",
"ic" : "false"
},
"aggsPresent" : "false",
"hierAggsPresent" : "false"
},
{
"k" : "116",
"id" : "DIM_1",
"n" : "Dim_1",
"vis" : "true",
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "false",
"@isLink" : "false",
"@ver" : "3",
"@hf" : "false",
"i" : "DIM_1",
"n" : "Dim_1",
"k" : "116",
"c" : "1025",
"p" : "103",
"h" : "false",
"hasPrv" : "false",
"ic" : "false"
},
"aggsPresent" : "false",
"hierAggsPresent" : "false"
},
{
"k" : "991",
"id" : "DIM_2",
"n" : "Dim_2",
"vis" : "true",
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "false",
"@isLink" : "false",
"@ver" : "0",
"@hf" : "false",
"i" : "DIM_2",
"n" : "Dim_2",
"k" : "991",
"c" : "1025",
"p" : "10529",
"h" : "false",
"hasPrv" : "false",
"ic" : "false"
},
"aggsPresent" : "false",
"hierAggsPresent" : "false"
}
]
}
},
"dimBinds" :
{
"its" :
{
"it" :
[
{
"dimKey" : "5858",
"datasets" :
{
"it" :
{
"dsKey" : "5878"
}
}
},
{
"dimKey" : "112",
"datasets" :
{
"it" :
{
"dsKey" : "5878",
"indexKey" : "7",
"indexBlockKey" : "3",
"attrs" :
{
"it" :
{
"attrKey" : "2",
"fieldId" : "V_DATE",
"formula" : "OBJ5877.V_DATE"
}
}
}
}
},
{
"dimKey" : "116",
"datasets" :
{
"it" :
{
"dsKey" : "5878",
"indexKey" : "121",
"indexBlockKey" : "120",
"attrs" :
{
"it" :
{
"attrKey" : "118",
"fieldId" : "DIM1_ID",
"formula" : "OBJ5877.DIM1_ID"
}
}
}
}
},
{
"dimKey" : "991",
"datasets" :
{
"it" :
{
"dsKey" : "5878",
"indexKey" : "1001",
"indexBlockKey" : "1000",
"attrs" :
{
"it" :
{
"attrKey" : "993",
"fieldId" : "DIM2_ID",
"formula" : "OBJ5877.DIM2_ID"
}
}
}
}
}
]
}
},
"factBinds" :
{
"its" :
{
"it" :
[
{
"factKey" : "1",
"dsKey" : "5878",
"formula" : "OBJ5877.VALUE",
"aggrType" : "None"
}
]
}
},
"calcBinds" :
{
"its" :
{
"it" :
[
{
"factKey" : "1",
"formula" : "",
"revFactKey" : "",
"revFormula" : "",
"timeLagLevel" : "None",
"timeForwardLag" : "0",
"timeBackwardLag" : "0",
"includeInSelection" : "false",
"calcMethod" : "BySelection"
}
]
}
},
"relations" :
{
"its" : ""
},
"selControl" :
{
"its" : "",
"options" : "",
"isEmpty" : "true"
}
}
}
}
}
{
"UpdCubeCacheResult" : "1"
}
public static bool UpdateCache(CubeId moniker, Listsels, ItKey destination)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tUpd = new UpdCubeCache()
{
tArg = new UpdCubeCacheArg()
{
sels = sels.ToArray(),
dest = destination
},
tCube = moniker
};
//Update cache
var result = somClient.UpdCubeCache(tUpd);
return result;
}
See also: