다음을 통해 공유


SourceColumn (clsColumn)

[!참고]

  이 기능은 다음 버전의 Microsoft SQL Server에서 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 말고, 현재 이 기능을 사용하는 응용 프로그램은 가능한 한 빨리 수정하십시오.

The SourceColumn property of an object of ClassType clsColumn identifies the name of its source column in a relational table. This property applies only to columns belonging to mining model objects of SubClassType sbclsRegular.

Data Type

String

Access

Read/write for columns with a SubClassType of sbclsRegular, read-only for all others.

주의

For columns with a SubClassType of sbclsNested that belong to a mining model object of SubClassType of sbclsRegular, this property returns an empty string.

To understand the function of this property, consider the relationships of columns in a model to an SQL query. If you use a SELECT query to define the structure of a table when you create a mining model, the contents of this property for each column in the model correspond to a column designation within the SELECT query. For example, consider the following query:

SELECT "Key" AS "CustId", "Age" AS "Age" FROM "People"

If a mining model were to be created using this SELECT statement, the SourceColumn properties for each column would be "Key" and "Age" respectively.

Examples

Creating a Data Mining Model

The following example creates a data mining model based upon the People table of a relational database. This table is specified by the FromClause property. Because the model is based upon a single table, no joins are needed. It then creates and adds two columns to the model's Columns collection. Each column is related to a field in the original relational table (that is to say, the People table) by setting the SourceColumn property of each column to the appropriate value.

dsoDmm.Description = "Analyzes the purchasing behavior of customers"
dsoDmm.MiningAlgorithm = "Microsoft_Decision_Trees"
dsoDmm.FromClause = "People"
dsoDmm.JoinClause = "" ' None is needed because there is only a single table.
dsoDmm.Filter = ""
dsoDmm.TrainingQuery = "" 'Let DSO figure out the training query.

Set dsoColumn = dsoDmm.Columns.AddNew("CustId")
dsoColumn.SourceColumn = "People.Key"
dsoColumn.DataType = adInteger
dsoColumn.IsKey = True

Set dsoColumn = dsoDmm.Columns.AddNew("Age")
dsoColumn.SourceColumn = "People.Age"
dsoColumn.DataType = adDouble
dsoColumn.ContentType = "CONTINUOUS"

참고 항목

참조