Getting Information about Calculated Cube Structure

Below is the example of using the GetCube operation to get information about calculated cube structure. The request contains the moniker of opened cube instance and the pattern that determined whether information about cube should be obtained. The response contains requested information.

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">
<GetCube xmlns="http://www.fsight.ru/PP.SOM.Som">
<tCube xmlns="">
  <id>S1!M!S!C2</id>
  </tCube>
<tArg xmlns="">
<pattern>
  <obInst>true</obInst>
  <dims>Get</dims>
  <sources>Get</sources>
  <calcCube>true</calcCube>
  <altSource>Get</altSource>
  </pattern>
  </tArg>
  </GetCube>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetCubeResult 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">
<id xmlns="">
  <id>S1!M!S!C2</id>
  </id>
<meta xmlns="">
<obInst>
<obDesc ds="" isShortcut="0" isLink="0" ver="5" hf="0">
  <i>CALC_CUBE</i>
  <n>Calculated cube</n>
  <k>6962</k>
  <c>1282</c>
  <p>5845</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  <isPermanent>1</isPermanent>
  <isTemp>0</isTemp>
  </obDesc>
  </obInst>
  <dirty>0</dirty>
<dims>
<its>
<it>
  <k>6964</k>
  <id>FACTS</id>
  <vis>1</vis>
<obDesc ds="" isShortcut="0" isLink="0" ver="3" hf="0">
  <i>FACTS</i>
  <n>Facts</n>
  <k>6964</k>
  <c>1028</c>
  <p>6962</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  </obDesc>
  </it>
<it>
  <k>112</k>
  <id>CALENDAR</id>
  <vis>1</vis>
<obDesc ds="" isShortcut="0" isLink="0" ver="8" hf="0">
  <i>CALENDAR</i>
  <n>Calendar</n>
  <k>112</k>
  <c>1026</c>
  <p>103</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  </obDesc>
  </it>
<it>
  <k>116</k>
  <id>DIM_1</id>
  <vis>1</vis>
<obDesc ds="" isShortcut="0" isLink="0" ver="3" hf="0">
  <i>DIM_1</i>
  <n>Dim_1</n>
  <k>116</k>
  <c>1025</c>
  <p>103</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  </obDesc>
  </it>
<it>
  <k>991</k>
  <id>DIM_2</id>
  <vis>1</vis>
<obDesc ds="" isShortcut="0" isLink="0" ver="1" hf="0">
  <i>DIM_2</i>
  <n>Dim_2</n>
  <k>991</k>
  <c>1025</c>
  <p>10529</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  </obDesc>
  </it>
  </its>
  </dims>
<sources>
<it>
  <k>1</k>
<cube ds="" isShortcut="0" isLink="0" ver="1" hf="0">
  <i>STD_CUBE_SOURCE</i>
  <n>Cube</n>
  <k>6948</k>
  <c>1281</c>
  <p>6947</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  </cube>
<destination>
  <k>1</k>
  <id>STD_CUBE_SOURCE</id>
  <n>Cube</n>
  <vis>1</vis>
  <isDefault>1</isDefault>
  </destination>
  </it>
  </sources>
<calcCube>
  <factsDimId>S1!M!S!C2!FactDim</factsDimId>
  <externalFactDimension>0</externalFactDimension>
  <formulasDestinationVisible>1</formulasDestinationVisible>
  <cacheFormulas>1</cacheFormulas>
  <includeNulls>0</includeNulls>
  <evaluateOnly>All</evaluateOnly>
<altSource>
  <k>0</k>
  <useExecute>0</useExecute>
  <useStorage>0</useStorage>
  <autoSaveToStorage>0</autoSaveToStorage>
  </altSource>
  </calcCube>
  </meta>
  </GetCubeResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetCube" :
{
"tCube" :
{
"id" : "S1!M!S!C2"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"dims" : "Get",
"sources" : "Get",
"calcCube" : "true",
"altSource" : "Get"
}
}
}
}

JSON response:

{
"GetCubeResult" :
{
"id" :
{
"id" : "S1!M!S!C2"
},
"meta" :
{
"obInst" :
{
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "5",
"@hf" : "0",
"i" : "CALC_CUBE",
"n" : "Calculated cube",
"k" : "6962",
"c" : "1282",
"p" : "5845",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0",
"isPermanent" : "1",
"isTemp" : "0"
}
},
"dirty" : "0",
"dims" :
{
"its" :
{
"it" :
[
{
"k" : "6964",
"id" : "FACTS",
"vis" : "1",
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "3",
"@hf" : "0",
"i" : "FACTS",
"n" : "Facts",
"k" : "6964",
"c" : "1028",
"p" : "6962",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0"
}
},
{
"k" : "112",
"id" : "CALENDAR",
"vis" : "1",
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "8",
"@hf" : "0",
"i" : "CALENDAR",
"n" : "Calendar",
"k" : "112",
"c" : "1026",
"p" : "103",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0"
}
},
{
"k" : "116",
"id" : "DIM_1",
"vis" : "1",
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "3",
"@hf" : "0",
"i" : "DIM_1",
"n" : "Dim_1",
"k" : "116",
"c" : "1025",
"p" : "103",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0"
}
},
{
"k" : "991",
"id" : "DIM_2",
"vis" : "1",
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "1",
"@hf" : "0",
"i" : "DIM_2",
"n" : "Dim_2",
"k" : "991",
"c" : "1025",
"p" : "10529",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0"
}
}
]
}
},
"sources" :
{
"it" :
{
"k" : "1",
"cube" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "1",
"@hf" : "0",
"i" : "STD_CUBE_SOURCE",
"n" : "Cube",
"k" : "6948",
"c" : "1281",
"p" : "6947",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0"
},
"destination" :
{
"k" : "1",
"id" : "STD_CUBE_SOURCE",
"n" : "Cube",
"vis" : "1",
"isDefault" : "1"
}
}
},
"calcCube" :
{
"factsDimId" : "S1!M!S!C2!FactDim",
"externalFactDimension" : "0",
"formulasDestinationVisible" : "1",
"cacheFormulas" : "1",
"includeNulls" : "0",
"evaluateOnly" : "All",
"altSource" :
{
"k" : "0",
"useExecute" : "0",
"useStorage" : "0",
"autoSaveToStorage" : "0"
}
}
}
}
}
public static GetCubeResult GetCalculatedCubeInfo(CubeId moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tMeta = new GetCube()
{
tArg = new GetCubeArg()
{
pattern = new CubeMdPattern()
{
calcCube = true,
dims = ListOperation.Get,
altSource = ListOperation.Get,
sources = ListOperation.Get
}
},
tCube = moniker
};
//Get information about calculated cube structure
var result = somClient.GetCube(tMeta);
return result;
}

See also:

GetCube