Data Mining Programming
Applies to: SQL Server 2019 and earlier Analysis Services Azure Analysis Services Fabric/Power BI Premium
Important
Data mining was deprecated in SQL Server 2017 Analysis Services and now discontinued in SQL Server 2022 Analysis Services. Documentation is not updated for deprecated and discontinued features. To learn more, see Analysis Services backward compatibility.
If you find that the built-in tools and viewers in SQL Server Analysis Services do not meet your requirements, you can extend the power of SQL Server Analysis Services by coding your own extensions. In this approach, you have two options:
XMLA
SQL Server Analysis Services supports XML for Analysis (XMLA) as a protocol for communication with client applications. Additional commands are supported by SQL Server Analysis Services that extend the XML for Analysis specification.
Because SQL Server Analysis Services uses XMLA for data definition, data manipulation, and data control support, you can create mining structures and mining models by using the visual tools provided by SQL Server Data Tools, and then extend the data mining objects that you have created by using Data Mining Extensions (DMX) and Analysis Services Scripting Language (ASSL) scripts.
You can create and modify data mining objects entirely in XMLA scripts, and run prediction queries against the models programmatically from your own applications.
Analysis Management Objects (AMO)
SQL Server Analysis Services also provides a complete framework that enables third-party data mining providers to integrate the data mining objects into SQL Server Analysis Services.
You can create mining structures and mining models by using AMO. See the following samples in CodePlex:
AMO Browser
Connects to the SSAS instance you specify and lists all server objects and their properties, including mining structure and mining models.
AMO Simple Sample
The AS Simple Sample covers programmatic access to most major objects, and demonstrates metadata browsing, and access to the values in objects.
The sample also demonstrates how to create and process a data mining structure and model, as well as browse an existing data mining model.
DMX
You can use DMX to encapsulate command statements, prediction queries, and metadata queries and return results in a tabular format, assuming you have created a connection to an SQL Server Analysis Services server.
In This Section
OLE DB for Data Mining
Describes additions to the specification to support data mining and multidimensional data: new schema rowsets and columns, Data Mining Extensions (DMX) language for creating and managing mining structures.
Related Reference
Developing with ADOMD.NET
Introduces ADOMD.NET client and server programming objects.
Developing with Analysis Management Objects (AMO)
Introduces the AMO programming library.
Developing with Analysis Services Scripting Language (ASSL)
Introduces XML for Analysis (XMLA) and its extensions.
See Also
Analysis Services Developer Documentation
Data Mining Extensions (DMX) Reference