SemanticLayerSourcesDelete

Syntax

bool SemanticLayerSourcesDelete(string mon, OpItemKey tArg)

Parameters

mon. Moniker for working with data model sources.

tArg. Key of removed data source.

Description

The SemanticLayerSourcesDelete operation removes source from data model.

Comments

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.

Example

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.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SemanticLayerSourcesDelete xmlns="http://www.fsight.ru/PP.SOM.Som">
  <mon xmlns="">ECLILKDCBLBDGOAEDKMFIAIDMENFPGPEHLJFNFCLBKCMGDDH!M!S!PHNEOHMDCBLBDGOAECKLPNOCOILIKDEJEJKJAGADEKNADKACB!Sources</mon>
<tArg xmlns="">
  <k>1</k>
  </tArg>
  </SemanticLayerSourcesDelete>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <SemanticLayerSourcesDeleteResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">1</SemanticLayerSourcesDeleteResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SemanticLayerSourcesDelete" :
{
"mon" : "ECLILKDCBLBDGOAEDKMFIAIDMENFPGPEHLJFNFCLBKCMGDDH!M!S!PHNEOHMDCBLBDGOAECKLPNOCOILIKDEJEJKJAGADEKNADKACB!Sources",
"tArg" :
{
"k" : "1"
}
}
}

JSON response:

{
"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:

Working with Data Models