UpdCubeCache

Syntax

bool UpdCubeCache(CubeId tCube, UpdCubeCacheArg tArg)

Parameters

tMon. Cube moniker.

tArg. Operation execution parameters.

Description

The UpdCubeCache operation updates In-Memory cache for the specified cube.

Comments

The operation enables updating cube In-Memory cache files on BI server that is used for processing. The cache is updated by specified cube selection (the tArg.sels field) and for the specified cube display variant (the tArg.dest field). The operation returns True, if update was successful and False, if any errors occurred on updating.

NOTE. To provide an operation correct processing, it is required that only current BI server uses cache files.

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

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