PivotMetaData GetPivotMetaData(string mon, PivotMetaData tArg)
mon. Moniker for working with base of data slice.
tArg. Parameters for getting information about slice base.
The GetPivotMetaData operation gets base for creating a data source slice of analytical data area.
The operation gets various settings that affect creating a slice and getting data. To execute the operation, in the mon field specify regular report instance moniker with the !DataArea!DataSources!<data source key>!DataSourceSlices!<slice key>!Pivot postfix to work with slice base, and in the tArg field specify settings to be obtained.
The moniker can be obtained on executing the OpenPrxMeta operation.
In the tArg field set empty values or default values for the fields, which values should be obtained. Specify one element for collections. To get information about a specific element, specify its key in metadata. If -1 is specified as a key value, information about all elements of this type is obtained.
Below is the example of getting information about data source slice base. The request contains moniker for working with data slice base and a list of the fields, which values should be obtained. The response contains requested information.
{
"GetPivotMetaData" :
{
"mon" : "S1!M!S!P1!DataArea!DataSources!1!DataSourceSlices!1!Pivot",
"tArg" :
{
"dims" :
{
"its" :
{
"it" :
[
{
"k" : "-1",
"id" : "",
"n" : "",
"position" : "Unknown",
"index" : "0"
}
]
}
}
}
}
}
{
"GetPivotMetaDataResult" :
{
"dims" :
{
"its" :
{
"it" :
[
{
"k" : "5858",
"id" : "FACTS",
"n" : "Facts",
"position" : "Fixed",
"index" : "0"
},
{
"k" : "112",
"id" : "CALENDAR",
"n" : "Calendar",
"position" : "Top",
"index" : "0"
},
{
"k" : "116",
"id" : "DIM_1",
"n" : "Dim_1",
"position" : "Left",
"index" : "0"
},
{
"k" : "991",
"id" : "DIM_2",
"n" : "Dim_2",
"position" : "Fixed",
"index" : "1"
}
]
}
}
}
}
public static PivotMetaData GetPivotInfo(string moniker, ulong dataSourceKey, ulong sliceKey)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tGet = new GetPivotMetaData()
{
tArg = new PivotMetaData()
{
dims = new PivotDimensions()
{
its = new PivotDimension[1]
{
new PivotDimension()
{
k = ulong.MaxValue,
id = "",
n = "",
position = PvtDimPos.Unknown,
index = 0
}
}
}
},
mon = moniker + "!DataArea!DataSources!" + dataSourceKey.ToString() + "!DataSourceSlices!" + sliceKey.ToString() + "!Pivot"
};
//Get information about slice base
var result = somClient.GetPivotMetaData(tGet);
return result;
}
See also: