Data Mining Extensions (DMX) Statement Reference

 

Updated: March 2, 2016

Working with data mining models in Microsoft SQL Server Analysis Services involves the following primary tasks:

  • Creating mining structures and mining models

  • Processing mining structures and mining models

  • Deleting or dropping mining structures or mining models

  • Copying mining models

  • Browsing mining models

  • Predicting against mining models

You can use Data Mining Extensions (DMX) statements to perform each of these tasks programmatically.

Creating mining structures and mining models
Use the CREATE MINING STRUCTURE (DMX) statement to add a new mining structure to a database. You can then use the ALTER MINING STRUCTURE (DMX) statement to add mining models to the mining structure.

Use the CREATE MINING MODEL (DMX) statement to build a new mining model and associated mining structure.

Processing mining structures and mining models
Use the INSERT INTO (DMX) statement to process a mining structure and mining model.

Deleting or dropping mining structures or mining models
Use the DELETE (DMX) statement to remove all the trained data from a mining model or mining structure. Use the DROP MINING STRUCTURE (DMX) or DROP MINING MODEL (DMX) statements to completely remove a mining structure or mining model from a database.

Copying mining models
Use the SELECT INTO (DMX) statement to copy the structure of an existing mining model into a new mining model and to train the new model with the same data.

Browsing mining models
Use the SELECT (DMX) statement to browse the information that the data mining algorithm calculates and stores in the data mining model during model training. Much like with Transact-SQL, you can use several clauses with the SELECT statement, to extend its power. These clauses include DISTINCT FROM <model>, FROM <model>.CASES, FROM <model>.SAMPLE_CASES, FROM <model>.CONTENT and FROM <model>.DIMENSION_CONTENT.

Predicting against mining models
Use the PREDICTION JOIN clause of the SELECT statement to create predictions that are based on an existing mining model.

You can also import and export models by using the IMPORT (DMX) and EXPORT (DMX) statements.

These tasks fall into two categories, data definition statements and data manipulation statements, which are described in the following table.

TopicDescription
Data Mining Extensions (DMX) Data Definition StatementsPart of the data definition language (DDL). Used to define a new mining model (including training) or to drop an existing mining model from a database.
Data Mining Extensions (DMX) Data Manipulation StatementsPart of the data manipulation language (DML). Used to work with existing mining models, including browsing a model or creating predictions.

Data Mining Extensions (DMX) Function Reference
Data Mining Extensions (DMX) Operator Reference
Data Mining Extensions (DMX) Syntax Conventions
Data Mining Extensions (DMX) Syntax Elements

Community Additions

ADD
Show: