Overview
The Mining Model Viewer in SQL Server Data Mining provides a graphical interface for exploring, testing, and visualizing mining models. This page lists the primary tasks you can perform in the viewer and provides detailed instructions for each.
Common Tasks
- Viewing model structure and parameters.
- Running test queries against the model.
- Generating charts for classification, clustering, and association rules.
- Exporting model visualizations as images.
- Saving and publishing modifications to the model.
Step‑by‑Step Instructions
1. Open the Mining Model Viewer
- In SQL Server Management Studio (SSMS), connect to the Analysis Services instance.
- Navigate to Databases > YourDatabase > Mining Models.
- Right‑click the desired model and select View → Mining Model Viewer.
2. Explore Model Structure
- The left pane shows the model diagram. Hover over any node to see its properties.
- Click a node to display detailed attributes in the properties panel below.
3. Run a Test Query
4. Generate a Chart
- Select Chart from the toolbar.
- Choose a chart type (e.g., Decision Tree, Cluster Plot).
- Configure the axes and click Generate.
Sample Code
The following MDX query demonstrates how to retrieve the top 5 predicted classes for a given input record.
SELECT
TOPCOUNT(
Predict(
[MiningModel].[Classification],
'{
"Age": 35,
"Income": 72000,
"Education": "Bachelor"
}'
),
5
) ON COLUMNS
FROM [YourCube];