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.
{
"GetCube" :
{
"tCube" :
{
"id" : "S1!M!S!C2"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"dims" : "Get",
"sources" : "Get",
"calcCube" : "true",
"altSource" : "Get"
}
}
}
}
{
"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: