SemanticLayerMetaResult GetSemanticLayerMeta(string mon, SemanticLayerMetaArg tArg)
mon. Opened data model instance moniker.
tArg. Operation execution parameters.
The GetSemanticLayerMeta operation gets data model metadata.
To execute the operation, in the mon field specify moniker of opened data model instance, and in the tArg.meta field specify empty values or default values for the fields with metadata, which values should be obtained. The moniker can be obtained on executing the OpenSemanticLayer operation.
The operation results in the obtained data model metadata.
Below is the example of getting a list of data sources and data model visualization settings. The request contains moniker of opened data model instance and a list of obtained fields. The response contains the obtained information.
{
"GetSemanticLayerMeta" :
{
"mon" : "OBNIHFAHPABDGOAEGDPOIOEEEEFKFMOEBLJPNILDEGIADEAK!M!S!POFIOKJAHPABDGOAEHEMNLOGBNPHIANDECKECPPGGIBIEIJCA",
"tArg" :
{
"meta" :
{
"sources" :
{
"its" :
{
"it" :
[
{
"k" : "-1",
"id" : "",
"n" : "",
"driver" : "",
"customName" : "",
"DBMSName" : ""
}
]
}
},
"viewSettings" : ""
}
}
}
}
{
"GetSemanticLayerMetaResult" :
{
"id" :
{
"id" : "OBNIHFAHPABDGOAEGDPOIOEEEEFKFMOEBLJPNILDEGIADEAK!M!S!POFIOKJAHPABDGOAEHEMNLOGBNPHIANDECKECPPGGIBIEIJCA"
},
"meta" :
{
"sources" :
{
"its" :
{
"it" :
[
{
"k" : "1",
"id" : "SUBJECTS",
"n" : "Subjects",
"driver" : "",
"customName" : "Subjects",
"DBMSName" : ""
},
{
"k" : "2",
"id" : "OBJECTS",
"n" : "Objects",
"driver" : "",
"customName" : "Objects",
"DBMSName" : ""
}
]
}
},
"viewSettings" : "{"version":"2","isHiddenFieldsVisible":true,"previewTableHeight":0.48329355608591884,"targetPreviewTableHeight":1,"previewTableAutoUpdate":true,"sourcesDropdowns":{"1":{"expanded":false},"2":{"expanded":false}},"visibleArea":{"x":0,"y":0,"height":838,"width":990,"offsetX":320,"offsetY":48},"zoom":1}"
}
}
}
public static SemanticLayerMetaResult GetSemanticLayerMeta(string moniker)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new GetSemanticLayerMeta()
{
tArg = new SemanticLayerMetaArg()
{
meta = new SemanticLayer()
{
sources = new SemanticLayerSources()
{
its = new SemanticLayerSource[]
{
new SemanticLayerSource()
{
k = uint.MaxValue,
id = string.Empty,
n = string.Empty,
customName = string.Empty,
DBMSName = string.Empty,
driver = string.Empty,
}
}
},
viewSettings = string.Empty,
}
},
// Moniker of opened data model instance
mon = moniker
};
// Get information about data model
var result = somClient.GetSemanticLayerMeta(tGet);
return result;
}
See also: