Comments 0

Document transcript

MYDESINEWS.COM

2013

June 23, 2013

Data Mining Query Task

The Data Mining Query task runs prediction queries based on data mining models built inAnalysis Services. The prediction query creates a prediction for new data by using miningmodels. For example, a prediction query can predicthow many sailboats are likely to sell duringthe summer months or generate a list of prospective customers who are likely to buy a sailboat.

Prediction Queries:The query is a Data Mining Extensions (DMX) statement. The DMX language is anextension of the SQL language that provides support for working with mining models.

The taskcan query multiple mining models that are built on the same mining structure. A miningmodel is built using one of the data mining algorithms that Analysis Services provides. Themining structure that the Data Mining Query task references can include multiple mining models,built using different algorithms.

The prediction query that the Data Mining Query task runs returns a result that is a single row ora data set. A query that returns a single row is called a singleton query: for example, the querythat predicts how many sailboats will be sold during the summer months returns a number.

The query results are saved to tables. If a table with the name that the Data Mining Query taskspecifies already exists, the task can create a new table, using the same name with a numberappended, or it can overwrite the table content.

If the results include nesting, the result is flattened before it is saved. Flattening a result changesa nested result set to a table. For example, flattening a nested result with aCustomer

column anda nestedProduct

column adds rows to theCustomer

column to make a table that includesproduct data for each customer. For example, a customer with three different products becomes atable with three rows, repeating the customer in each row and including a different product ineach row. If the FLATTENED keyword is omitted, the table contains only theCustomer

columnand only one row per customer.

Configuration of the Data Mining Query Task

:

The Data Mining Query task requires two connections.

The first connection is anAnalysis Services connection manager that connects either to an instance of Microsoft

SQLServer

Analysis Services or to an Analysis Services project that contains the mining structureand the mining model. The second connection

is an OLE DB connection manager that connectsto the SQL Server database that contains the table to which the task writes.