bool SemanticLayerSourcesDelete(string mon, OpItemKey tArg)
mon. Moniker for working with data model sources.
tArg. Key of removed data source.
The SemanticLayerSourcesDelete operation removes source from data model.
To execute the operation, in the mon field specify moniker of opened data model instance with the !Sources postfix, and in the tArg.k field specify key of removed data source. The moniker can be obtained on executing the OpenSemanticLayer operation. The key can be obtained using the GetSemanticLayerSources operation.
The operation results in the logical true if data source was removed successfully.
Below is the example of removing data source from data model. The request contains moniker for working with data sources and key of removed data source. The response contains whether removal was successful.
{
"SemanticLayerSourcesDelete" :
{
"mon" : "ECLILKDCBLBDGOAEDKMFIAIDMENFPGPEHLJFNFCLBKCMGDDH!M!S!PHNEOHMDCBLBDGOAECKLPNOCOILIKDEJEJKJAGADEKNADKACB!Sources",
"tArg" :
{
"k" : "1"
}
}
}
{
"SemanticLayerSourcesDeleteResult" : "1"
}
public static bool SemanticLayerSourcesDelete(string moniker, uint sourceKey)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tDel = new SemanticLayerSourcesDelete()
{
tArg = new OpItemKey()
{
k = sourceKey
},
// Moniker of opened data model instance
mon = moniker + "!Sources"
};
// Remove source from data model
var result = somClient.SemanticLayerSourcesDelete(tDel);
return result;
}
See also: