Data Mining Extensions (DMX) Reference

Applies to: SQL Server Analysis Services

Important

Data mining is deprecated in SQL Server Analysis Services 2017 and will be discontinued in a future release. Documentation is not updated for deprecated features. To learn more, see Analysis Services backward compatibility.

Data Mining Extensions (DMX) is a language that you can use to create and work with data mining models in Microsoft SQL Server Analysis Services. You can use DMX to create the structure of new data mining models, to train these models, and to browse, manage, and predict against them. DMX is composed of data definition language (DDL) statements, data manipulation language (DML) statements, and functions and operators.

Microsoft OLE DB for Data Mining Specification

The data mining features in Analysis Services are built to comply with the Microsoft OLE DB for Data Mining specification.

The Microsoft OLE DB for Data Mining specification defines the following:

  • A structure to hold the information that defines a data mining model.

  • A language for creating and working with data mining models.

The specification defines the basis of data mining as the data mining model virtual object. The data mining model object encapsulates all that is known about a particular mining model. The data mining model object is structured like an SQL table, with columns, data types, and meta information that describe the model. This structure lets you use the DMX language, which is an extension of SQL, to create and work with models.

For More Information: Mining Structures (Analysis Services - Data Mining)

DMX Statements

You can use DMX statements to create, process, delete, copy, browse, and predict against data mining models. There are two types of statements in DMX: data definition statements and data manipulation statements. You can use each type of statement to perform different kinds of tasks.

The following sections provide more information about working with DMX statements:

Data Definition Statements

Use data definition statements in DMX to create and define new mining structures and models, to import and export mining models and mining structures, and to drop existing models from a database. Data definition statements in DMX are part of the data definition language (DDL).

You can perform the following tasks with the data definition statements in DMX:

  • Create a mining structure by using the CREATE MINING STRUCTURE statement, and add a mining model to the mining structure by using the ALTER MINING STRUCTURE statement.

  • Create a mining model and associated mining structure simultaneously by using the CREATE MINING MODEL statement to build an empty data mining model object.

  • Export a mining model and associated mining structure to a file by using the EXPORT statement. Import a mining model and associated mining structure from a file that is created by the EXPORT statement by using the IMPORT statement.

  • Copy the structure of an existing mining model into a new model, and train it with the same data, by using the SELECT INTO statement.

  • Completely remove a mining model from a database by using the DROP MINING MODEL statement. Completely remove a mining structure and all its associated mining models from the database by using the DROP MINING STRUCTURE statement.

To learn more about the data mining tasks that you can perform by using DMX statements, see Data Mining Extensions (DMX) Statement Reference.

Back to DMX Statements

Data Manipulation Statements

Use data manipulation statements in DMX to work with existing mining models, to browse the models and to create predictions against them. Data manipulation statements in DMX are part of the data manipulation language (DML).

You can perform the following tasks with the data manipulation statements in DMX:

To learn more about the data mining tasks that you can perform by using DMX statements, see Data Mining Extensions (DMX) Statement Reference.

Back to DMX Statements

DMX Query Fundamentals

The SELECT statement is the basis for most DMX queries. Depending on the clauses that you use with such statements, you can browse, copy, or predict against mining models. The prediction query uses a form of SELECT to create predictions based on existing mining models. Functions extend your ability to browse and query the mining models beyond the intrinsic capabilities of the data mining model.

You can use DMX functions to obtain information that is discovered during the training of your models, and to calculate new information. You can use these functions for many purposes, including to return statistics that describe the underlying data or the accuracy of a prediction, or to return an expanded explanation of a prediction.

For More Information: Understanding the DMX Select Statement, General Prediction Functions (DMX), Structure and Usage of DMX Prediction Queries, Data Mining Extensions (DMX) Function Reference

Back to DMX Statements

See Also

Data Mining Extensions (DMX) Function Reference
Data Mining Extensions (DMX) Operator Reference
Data Mining Extensions (DMX) Statement Reference
Data Mining Extensions (DMX) Syntax Conventions
Data Mining Extensions (DMX) Syntax Elements
General Prediction Functions (DMX)
Structure and Usage of DMX Prediction Queries
Understanding the DMX Select Statement