Skip to content

Latest commit

 

History

History
63 lines (46 loc) · 2.64 KB

select-from-model-sample-cases-dmx.md

File metadata and controls

63 lines (46 loc) · 2.64 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic ms.custom
SELECT FROM <model>.SAMPLE_CASES (DMX)
SELECT FROM <model>.SAMPLE_CASES (DMX)
kfollis
kfollis
kfollis
02/17/2022
sql
analysis-services
reference
dmx

SELECT FROM <model>.SAMPLE_CASES (DMX)

[!INCLUDEssas]

Returns sample cases that are representative of the cases that are used to train the data mining model.

To use this statement, you must enable drillthrough when you create the mining model. For more information about enabling drillthrough, see CREATE MINING MODEL (DMX), SELECT INTO (DMX), and ALTER MINING STRUCTURE (DMX).

Syntax

  
SELECT [FLATTENED] [TOP <n>] <expression list> FROM <model>.SAMPLE_CASES  
[WHERE <condition list>] ORDER BY <expression> [DESC|ASC]]  

Arguments

n
Optional. An integer that specifies how many rows to return.

expression list
A comma-separated list of related column identifiers.

model
A model identifier.

condition list
Optional. Conditions to restrict the values that are returned from the column list.

expression
Optional. An expression that returns a scalar value.

Remarks

Sample cases may be generated and may not actually exist in the training data. The returned case is representative of the specified content node.

Although the [!INCLUDEmsCoName] Sequence Clustering algorithm is the only [!INCLUDEmsCoName] algorithm that supports using SELECT FROM <model>.SAMPLE_CASES, third-party algorithms may also support it.

Examples

The following example returns sample cases that are used to train the Target Mail mining model. Using the IsInNode (DMX) function in the WHERE clause returns only cases that are associated with the '000000003' node. The node string can be found in the NODE_UNIQUE_NAME column of the schema rowset.

Select * from [Sequence Clustering].SAMPLE_Cases  
WHERE IsInNode('000000003')  

See Also

SELECT (DMX)
Data Mining Extensions (DMX) Data Definition Statements
Data Mining Extensions (DMX) Data Manipulation Statements
Data Mining Extensions (DMX) Statement Reference