Viewing and Working with Mining Models

Learn how to explore, view, and maintain Data Mining models in SQL Server Analysis Services (SSAS). This guide covers the use of SQL Server Data Tools (SSDT), SSMS, and the REST API for model inspection, validation, and management.

Prerequisites

Explore a Mining Model in SSDT

Open the project containing your mining model, right‑click the model in the Solution Explorer and choose View.

Right‑click > View

Use the Mining Model Viewer to inspect the following:

  • Model structure and definition
  • Algorithm parameters
  • Mining schema (columns, roles, etc.)
  • Sample predictions

Connect to the Analysis Services instance, expand the database, and then expand Mining Models.

SELECT * FROM $SYSTEM.DISCOVER_MINING_MODEL_CONTENT

Right‑click a model and select Browse to open the Mining Model Viewer inside SSMS.

Use the SSAS REST endpoint to retrieve model metadata.

GET https://your-server/olap/msmdpump.dll?dbname=YourDB&cubes=YourCube&cmd=DISCover_MINING_MODEL_CONTENT¶m=ModelName

Typical response contains JSON with model definition, algorithm type, and column roles.

Validate a Mining Model

Before deploying a model to production, run validation to ensure the data source and algorithm settings are correct.

SELECT * FROM $SYSTEM.DISCOVER_MINING_MODEL_VALIDATION
WHERE MODEL_NAME = N'CustomerChurnModel'

Update Model Parameters

Adjust algorithm parameters without rebuilding the entire model using the ALTER MINING MODEL statement.

ALTER MINING MODEL [AdventureWorks].[CustomerChurnModel]
SET CONTENT (
    ALGORITHM = N'Microsoft.MultinomialLogisticRegression',
    MAX_ITERATIONS = 100
)

Related Topics