GetDmDataSource

Syntax

DmDataSourceResult GetDmDataSource(DmDataSource tArg)

Parameters

tArg. Data source, which information should be obtained.

Description

The GetDmDataSource operation gets information about a data mining source.

Comments

To execute the operation, in the tArg field specify general information about a data source.

The operation results in the information about the data in the source for data mining.

Example

Below is the example of getting information about a data source for data mining. The request contains data source moniker and information about data contained in it. The response contains information about data in the source.

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">
<GetDmDataSource xmlns="http://www.fsight.ru/PP.SOM.Som">
<tArg xmlns="">
  <kind>DmReport</kind>
  <moniker>NJGNHPFCGJPLFOAEJIEHJJBIOJAKKBNEKKIELOKLJKFHPBCK!M!S!PMLFKAGGCGJPLFOAELHMPPKJEPKBGHJEEILCNPIBPFFNNKOJO</moniker>
<reportDataSource>
  <sheetIndex>0</sheetIndex>
<range>
  <left>0</left>
  <top>0</top>
  <width>8</width>
  <height>10</height>
  </range>
  </reportDataSource>
  <dataInColumns>true</dataInColumns>
  </tArg>
  </GetDmDataSource>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetDmDataSourceResult 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">
<reportDataSource xmlns="">
<range>
  <left>0</left>
  <top>0</top>
  <width>8</width>
  <height>10</height>
  </range>
  </reportDataSource>
  <recordCount xmlns="">9</recordCount>
  <fieldCount xmlns="">8</fieldCount>
<fieldNames xmlns="">
  <s>GENDER</s>
  <s>EDUCATION</s>
  <s>MARITAL_STATUS</s>
  <s>HOMEA2000OWNER</s>
  <s>COMMUTEA2000DISTANCE</s>
  <s>PURCHASEDA2000BIKE</s>
  <s>INCOME</s>
  <s>AGE</s>
  </fieldNames>
  </GetDmDataSourceResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetDmDataSource" :
{
"tArg" :
{
"kind" : "DmReport",
"moniker" : "NJGNHPFCGJPLFOAEJIEHJJBIOJAKKBNEKKIELOKLJKFHPBCK!M!S!PMLFKAGGCGJPLFOAELHMPPKJEPKBGHJEEILCNPIBPFFNNKOJO",
"reportDataSource" :
{
"sheetIndex" : "0",
"range" :
{
"left" : "0",
"top" : "0",
"width" : "8",
"height" : "10"
}
},
"dataInColumns" : "true"
}
}
}

JSON response:

{
"GetDmDataSourceResult" :
{
"reportDataSource" :
{
"range" :
{
"left" : "0",
"top" : "0",
"width" : "8",
"height" : "10"
}
},
"recordCount" : "9",
"fieldCount" : "8",
"fieldNames" :
{
"s" :
[
"GENDER",
"EDUCATION",
"MARITAL_STATUS",
"HOMEA2000OWNER",
"COMMUTEA2000DISTANCE",
"PURCHASEDA2000BIKE",
"INCOME",
"AGE"
]
}
}
}
public static DmDataSourceResult GetDmDataSource(string prxMoniker)
{
// Create a proxy object for operation execution
var somClient = new SomPortTypeClient();
// Set operation execution parameters
var tGet = new GetDmDataSource()
{
tArg = new DmDataSource()
{
kind = DmDataSourceKind.DmReport,
dataInColumns = true,
moniker = prxMoniker,
reportDataSource = new DmReportDataSource()
{
sheetIndex = 0,
range = new TabRange()
{
left = 0,
top = 0,
height = 10,
width = 8
}
}
}
};
// Get information about data source for data mining
var result = somClient.GetDmDataSource(tGet);
return result;
}

See also:

Working with Modeling Container