Below is the example of using the GetCube operation to get information about cube structure. The request contains moniker of opened cube instance and the pattern indicating whether all the information on the cube structure must be obtained. The response contains requested information.
{ "GetCube" : { "tCube" : { "id" : "S1!M!S!C1"
}, "tArg" : { "pattern" : { "obInst" : "true", "all" : "true" } } } }
{ "GetCubeResult" : { "id" : { "id" : "S1!M!S!C1"
}, "meta" : { "obInst" : { "obDesc" : { "@isShortcut" : "0", "@isLink" : "0", "i" : "STD_CUBE",
"n" : "Cube", "k" : "5857", "c" : "1281", "p" : "5845", "h" : "0" } }, "dirty" : "0", "dims" : {
"its" : { "it" : [ { "k" : "5858", "id" : "FACTS", "n" : "Facts", "vis" : "1", "obDesc" :
{ "@isShortcut" : "0", "@isLink" : "0", "i" : "FACTS", "n" : "Facts", "k" : "5858", "c" : "1028", "p" : "5857", "h" : "0" }
}, { "k" : "112", "id" : "CALENDAR", "n" : "Calendar", "vis" : "1", "obDesc" : { "@isShortcut" : "0", "@isLink" : "0",
"i" : "CALENDAR", "n" : "Calendar", "k" : "112", "c" : "1026", "p" : "103", "h" : "0" } }, { "k" : "116",
"id" : "DIM_1", "n" : "Dim_1", "vis" : "1", "obDesc" : { "@isShortcut" : "0", "@isLink" : "0", "i" : "DIM_1", "n" : "Dim_1", "k" : "116",
"c" : "1025", "p" : "103", "h" : "0" } }, { "k" : "991", "id" : "DIM_2", "n" : "Dim_2", "vis" : "1",
"obDesc" : { "@isShortcut" : "0", "@isLink" : "0", "i" : "DIM_2", "n" : "Dim_2", "k" : "991", "c" : "1025", "p" : "989", "h" : "0"
} } ] } }, "dests" : { "its" : { "it" :
[ { "k" : "1", "id" : "STD_CUBE", "n" : "Cube", "vis" : "1", "isDefault" : "1" } ] }
}, "selControl" : { "its" : "", "options" : "", "isEmpty" : "1" }, "supportsRub" : "0" } } }
public static GetCubeResult GetCubeInfo(CubeId moniker) { var somClient = new SomPortTypeClient(); //Proxy object for operation execution //Operation execution parameters var tMeta = new GetCube() { tArg = new GetCubeArg() { pattern = new CubeMdPattern() { all = true } }, tCube = moniker }; //Get information on cube structure var result = somClient.GetCube(tMeta); return result; }
See also: