SSAS Model viewer – mining attributes/features results queries

After you have designed and processed/trained a mining model using data from the underlying mining structure, the mining model is complete and contains mining model content.

You can use this content to make predictions or analyze your data.

To retrieve mining model content, you can create a query against the data mining model.

The easiest way to create a content query is to execute the following DMX statement in SQL Server Management Studio:

SELECT * FROM [<mining model name>].CONTENT

Some of the algorithm specific useful SQL queries are as follows:


Declare @GetNODE_UNIQUE_NAME varchar(max);

Declare @GetNODE_UNIQUE_NAME varchar(max);

Declare @NODE_UNIQUE_NAME varchar(max);




insert into #TableNODE_UNIQUE_NAME

drop table #TableNODE_UNIQUE_NAME

Declare @GetModelResults varchar(max);

Declare @GetModelResults varchar(max);

Declare @GetModelResultsForRootNode varchar(max);

set @GetModelResults = N’SELECT *,getdate(),’+@ModelConfigurationKey+N’ FROM OPENQUERY(SSASlinkedservername,”SELECT FLATTENED [MODEL_NAME], [NODE_CAPTION],[NODE_TYPE], (SELECT ATTRIBUTE_NAME, ATTRIBUTE_VALUE, [SUPPORT], [PROBABILITY] FROM NODE_DISTRIBUTION WHERE VALUETYPE <> 1 ) AS t  from [‘ + @Model + N’].content WHERE IsDescendant(””””,””’+@NODE_UNIQUE_NAME+N””’)”)’



Discrete vs Discretized

In Microsoft SQL Server Analysis Services, you can define the both the physical data type for a column in a mining structure, and a logical content type for the column when used in a model,

The data type determines how algorithms process the data in those columns when you create mining models. Defining the data type of a column gives the algorithm information about the type of data in the columns, and how to process the data. Each data type in Analysis Services supports one or more content types for data mining.

The content type describes the behavior of the content that the column contains. For example, if the content in a column repeats in a specific interval, such as days of the week, you can specify the content type of that column as cyclical.

Some algorithms require specific data types and specific content types to be able to function correctly. For example, the Microsoft Naive Bayes algorithm cannot use continuous columns as input, and cannot predict continuous values.


Discrete means that the column contains a finite number of values with no continuum between values. For example, a gender column is a typical discrete attribute column, in that the data represents a specific number of categories.

The values in a discrete attribute column cannot imply ordering, even if the values are numeric. Moreover, even if the values used for the discrete column are numeric, fractional values cannot be calculated. Telephone area codes are a good example of discrete data that is numeric.

The Discrete content type is supported by all data mining data types.


Discretization is the process of putting values of a continuous set of data into buckets so that there are a limited number of possible values. You can discretize only numeric data.

Thus, the discretized content type indicates that the column contains values that represent groups, or buckets, of values that are derived from a continuous column. The buckets are treated as ordered and discrete values.

You can discretize your data manually, to ensure that you get the buckets you want, or you can use the discretization methods provided in SQL Server Analysis Services. Some algorithms perform discretization automatically.

The Discretized content type is supported by the following data types: DateDoubleLong, and Text.


Continuous means that the column contains values that represent numeric data on a scale that allows interim values. Unlike a discrete column, which represents finite, countable data, a continuous column represents scalable measurements, and it is possible for the data to contain an infinite number of fractional values. A column of temperatures is an example of a continuous attribute column.

When a column contains continuous numeric data, and you know how the data should be distributed, you can potentially improve the accuracy of the analysis by specifying the expected distribution of values. You specify the column distribution at the level of the mining structure. Therefore, the setting applies to all models that are based on the structure. The Continuous content type is supported by the following data types: DateDouble, and Long.

Power BI – Group Workspace and Content Pack – Dashboards Reports and Datasets

There are three basic types of content or building blocks in Power BI:

Datasets, Reports and Dashboards

Datasets are reporting models with attributes and measures (calculations) that a user can EXPLORE and build different types of visualizations. Datasets can also be RENAMED, DELETED and REFRESHED

Reports are collections of visuals.

Dashboards are a collection of tiles that are pinned from Reports by mouse over the desired chart and clicking on the Push Pin Icon. Tiles can be rearranged and resized.

Where do we store Dashboards, Reports and Datasets?

You will have two options for storing your content:

  • My Workspace
  • Group Workspaces

So how do I organize everything in Power BI?

Any content that will need governance or will potentially reach a large number of users should be stored in a group workspace. Content that does not require much collaboration and governance can be stored in your personal workspace. Another thing to consider is that a personal workspace is limited to 10GB in the Pro version. So is each group workspace. However, every new group gets another 10GB of storage which makes a group concept even more alluring.

OK, now that I have organized everything, how do I share it?

If you have a dashboard stored in your personal workspace, you can use a Share Dashboard feature.

Only dashboards can be shared (reports and datasets cannot).

Share Dashboard option is not available for dashboards created in Group workspaces.

Another way to share content, is by creating an organizational content pack.

We can create an organizational content pack by clicking the gear icon on the top right hand corner of the page

We will then have an option to specify who has access to the content pack, its Title and Description (both are required) and also what dashboards, reports and datasets should be included in it

Then click Publish button at the bottom of the page to complete content pack creation process.

After the content pack has been published, users with required access will have an option to consume it by clicking on Get Data->Get

The Definitive Guide on Collaboration in Power BI Reference

SharePoint Foundation Web Application Service Stuck at Starting

Navigate to the node using remote desktop and open command prompt as administrator.

Navigate to the bin directory containing stsadm:

cd C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\BIN\

start the service using:

stsadm -o provisionservice -action start -servicetype spwebservice

You will get operation completed successfully message. Now issue iisrest /noforce.


Restarting Microsoft SharePoint Foundation Web Application service is generally preferred through STSADM command instead of Central Admin

Today we had issues on one of the web nodes and hence we restarted Microsoft SharePoint Foundation Web Application using Central Admin. The service kept showing “Starting”.

We redid our IIS bindings expicilty.

The using STSADM command stsadm -o provisionservice -action start -servicetype spwebservice executed on DOS prompt on \Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\BIN directory.

Issued iisreset command.

Now the service shows started through Central Admin.

MSDN Reference