DmDataSourceResult GetDmDataSource(DmDataSource tArg)
tArg. Data source, which information should be obtained.
The GetDmDataSource operation gets information about a data mining source.
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.
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.
{
"GetDmDataSource" :
{
"tArg" :
{
"kind" : "DmReport",
"moniker" : "NJGNHPFCGJPLFOAEJIEHJJBIOJAKKBNEKKIELOKLJKFHPBCK!M!S!PMLFKAGGCGJPLFOAELHMPPKJEPKBGHJEEILCNPIBPFFNNKOJO",
"reportDataSource" :
{
"sheetIndex" : "0",
"range" :
{
"left" : "0",
"top" : "0",
"width" : "8",
"height" : "10"
}
},
"dataInColumns" : "true"
}
}
}
{
"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: