UpdCubeCache

Syntax

bool UpdCubeCache(CubeId tCube, UpdCubeCacheArg tArg)

Parameters

tMon. Cube moniker.

tArg. Operation execution parameters.

Description

The UpdCubeCache operation creates a new or updates the existing In-Memory cache for the specified cube.

Comments

The operation creates a new cache or updates files of existing In-Memory cache of cube on BI server, which is worked with. On an attempt to update cube cache several times at the same time, the update operations are executed one by one. Cache is updated according to 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 operation work, cache files should be used only by the current BI server.

Example

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<UpdCubeCache xmlns="http://www.fsight.ru/PP.SOM.Som">
<tCube xmlns="">
  <id>S1!M!S!C1</id>
  </tCube>
<tArg xmlns="">
<sels>
<it>
  <k>5858</k>
  <id>FACTS</id>
<sel>
  <elSelectOp>Select</elSelectOp>
  <elRelative>All</elRelative>
  </sel>
  </it>
<it>
  <k>112</k>
  <id>CALENDAR</id>
<sel>
  <elSelectOp>Unknown</elSelectOp>
  <elRelative>Unknown</elRelative>
<setCalendarPeriod>
  <active>true</active>
  <start>2000-01-01</start>
  <end>2000-12-01</end>
<levels>
  <it>Quarter</it>
  </levels>
  <append>false</append>
  <findOutActive>false</findOutActive>
  </setCalendarPeriod>
  </sel>
  </it>
<it>
  <k>116</k>
  <id>DIM_1</id>
<sel>
  <elSelectOp>Select</elSelectOp>
  <elRelative>All</elRelative>
  </sel>
  </it>
<it>
  <k>991</k>
  <id>DIM_2</id>
<sel>
  <elSelectOp>Select</elSelectOp>
  <elRelative>All</elRelative>
  </sel>
  </it>
  </sels>
<dest xsi:type="q1:CubeDest" xmlns:q1="http://www.fsight.ru/PP.SOM.Som">
  <k>1</k>
  <id>STD_CUBE</id>
  <n>Cube</n>
  <vis>true</vis>
  <isDefault>true</isDefault>
  <hideTrivialFactDimension>false</hideTrivialFactDimension>
  <selSetOriginalOnly>false</selSetOriginalOnly>
  <useMultiAttrTable>false</useMultiAttrTable>
<datasets>
<its>
<it>
  <k>5878</k>
  <id>OBJ5877</id>
  <n>Table</n>
  <vis>true</vis>
  <aggrType>Server</aggrType>
  <useSubqueryOptimization>true</useSubqueryOptimization>
  </it>
  </its>
  </datasets>
<dims>
<its>
<it>
  <k>5858</k>
  <id>FACTS</id>
  <n>Facts</n>
  <vis>true</vis>
<obDesc isShortcut="false" isLink="false" ds="" ver="1" hf="false">
  <i>FACTS</i>
  <n>Facts</n>
  <k>5858</k>
  <c>1028</c>
  <p>5857</p>
  <h>false</h>
  <hasPrv>false</hasPrv>
  <ic>false</ic>
  </obDesc>
  <aggsPresent>false</aggsPresent>
  <hierAggsPresent>false</hierAggsPresent>
  </it>
<it>
  <k>112</k>
  <id>CALENDAR</id>
  <n>Calendar</n>
  <vis>true</vis>
<obDesc isShortcut="false" isLink="false" ds="" ver="6" hf="false">
  <i>CALENDAR</i>
  <n>Calendar</n>
  <k>112</k>
  <c>1026</c>
  <p>103</p>
  <h>false</h>
  <hasPrv>false</hasPrv>
  <ic>false</ic>
  </obDesc>
  <aggsPresent>false</aggsPresent>
  <hierAggsPresent>false</hierAggsPresent>
  </it>
<it>
  <k>116</k>
  <id>DIM_1</id>
  <n>Dim_1</n>
  <vis>true</vis>
<obDesc isShortcut="false" isLink="false" ds="" ver="3" hf="false">
  <i>DIM_1</i>
  <n>Dim_1</n>
  <k>116</k>
  <c>1025</c>
  <p>103</p>
  <h>false</h>
  <hasPrv>false</hasPrv>
  <ic>false</ic>
  </obDesc>
  <aggsPresent>false</aggsPresent>
  <hierAggsPresent>false</hierAggsPresent>
  </it>
<it>
  <k>991</k>
  <id>DIM_2</id>
  <n>Dim_2</n>
  <vis>true</vis>
<obDesc isShortcut="false" isLink="false" ds="" ver="0" hf="false">
  <i>DIM_2</i>
  <n>Dim_2</n>
  <k>991</k>
  <c>1025</c>
  <p>10529</p>
  <h>false</h>
  <hasPrv>false</hasPrv>
  <ic>false</ic>
  </obDesc>
  <aggsPresent>false</aggsPresent>
  <hierAggsPresent>false</hierAggsPresent>
  </it>
  </its>
  </dims>
<dimBinds>
<its>
<it>
  <dimKey>5858</dimKey>
<datasets>
<it>
  <dsKey>5878</dsKey>
  </it>
  </datasets>
  </it>
<it>
  <dimKey>112</dimKey>
<datasets>
<it>
  <dsKey>5878</dsKey>
  <indexKey>7</indexKey>
  <indexBlockKey>3</indexBlockKey>
<attrs>
<it>
  <attrKey>2</attrKey>
  <fieldId>V_DATE</fieldId>
  <formula>OBJ5877.V_DATE</formula>
  </it>
  </attrs>
  </it>
  </datasets>
  </it>
<it>
  <dimKey>116</dimKey>
<datasets>
<it>
  <dsKey>5878</dsKey>
  <indexKey>121</indexKey>
  <indexBlockKey>120</indexBlockKey>
<attrs>
<it>
  <attrKey>118</attrKey>
  <fieldId>DIM1_ID</fieldId>
  <formula>OBJ5877.DIM1_ID</formula>
  </it>
  </attrs>
  </it>
  </datasets>
  </it>
<it>
  <dimKey>991</dimKey>
<datasets>
<it>
  <dsKey>5878</dsKey>
  <indexKey>1001</indexKey>
  <indexBlockKey>1000</indexBlockKey>
<attrs>
<it>
  <attrKey>993</attrKey>
  <fieldId>DIM2_ID</fieldId>
  <formula>OBJ5877.DIM2_ID</formula>
  </it>
  </attrs>
  </it>
  </datasets>
  </it>
  </its>
  </dimBinds>
<factBinds>
<its>
<it>
  <factKey>1</factKey>
  <dsKey>5878</dsKey>
  <formula>OBJ5877.VALUE</formula>
  <aggrType>None</aggrType>
  </it>
  </its>
  </factBinds>
<calcBinds>
<its>
<it>
  <factKey>1</factKey>
  <formula />
  <revFactKey />
  <revFormula />
  <timeLagLevel>None</timeLagLevel>
  <timeForwardLag>0</timeForwardLag>
  <timeBackwardLag>0</timeBackwardLag>
  <includeInSelection>false</includeInSelection>
  <calcMethod>BySelection</calcMethod>
  </it>
  </its>
  </calcBinds>
<relations>
  <its />
  </relations>
<selControl>
  <its />
  <options />
  <isEmpty>true</isEmpty>
  </selControl>
  </dest>
  </tArg>
  </UpdCubeCache>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <UpdCubeCacheResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">1</UpdCubeCacheResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"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"
}
}
}
}
}

JSON response:

{
"UpdCubeCacheResult" : "1"
}
public static bool UpdateCache(CubeId moniker, List sels, 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:

Working with Cubes