Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
ssas

ssas

Ratings: (0)|Views: 79|Likes:

More info:

Published by: Hazarath Vadapalli Annangi on Jun 10, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

06/10/2011

pdf

text

original

 
SQL_2008 / Practical DMX Queries for Microsoft SQL Server Analysis Services 2008 / Art Tennick / 866-0 / Chapter 1
Cases Queries
Chapter 1
 
ch01.indd 17/28/10 4:34:42 PM
 
 
2
Practical DMX Queries for Microsoft SQL Server Analysis Services 2008
SQL_2008 / Practical DMX Queries for Microsoft SQL Server Analysis Services 2008 / Art Tennick /866-0 / Chapter 1
C
ases are the relational database records (or cube attributes and measures) usedto initially populate a data mining structure. These cases are then available totrain (and, optionally, later test) the data mining models within the miningstructure. This is your source data. This chapter explores ways of viewing the cases within structures and models. A good knowledge and understanding of the cases willhelp you achieve more accurate and meaningful data mining results. We use DMX Cases queries to look at the cases.
c
 
Key concepts
Mining structure cases, mining model cases, nested case tables,training and testing (hold out) cases, drill-through, subqueries
c
 
Keywords
Select, Distinct, Top, Flattened, From, Where, Order By, .cases,.sample_cases, IsInNode(), IsTrainingCase(), IsTestCase(), StructureColumn()
Examining Source Data
 The source data is the data originally used to populate a mining structure. This data (ora subset) is then used to train the mining models within the structure. You can optionally store a copy of the source data permanently inside the mining structure—this is now independent of the initial relational or multidimensional source. To examine this storedcopy of the original source, you will need a DMX Cases query on the mining structure.
Syntax
-- select all cases from structure-- this is a comment as is the line aboveselect * from mining structure [customer mining].cases;
Result
ch01.indd 26/17/10 5:04:05 PM
 
SQL_2008 / Practical DMX Queries for Microsoft SQL Server Analysis Services 2008 / Art Tennick / 866-0 / Chapter 1
Chapter 1: Cases Queries
3
Analysis
 The name of the mining structure is followed by .cases. The data from the cases is displayed. The results will vary from structure to structure. In this example, the Customer Miningstructure contains a nested case table called Subcategories. You can view the contents of this nested table by expanding it. When you design the structure in SQL Server BusinessIntelligence Development Studio (BIDS), there is a CacheMode property. In order tosee the cases, this property has to be set to KeepTrainingCases. The other setting for thisproperty is ClearAfterProcessing—this means that a copy of the source data is not storedin the structure after the models in the structure are trained, and a Cases query will notreturn any data. The semicolon at the end of the query is optional, but is consideredgood practice as it explicitly delineates the query if you have more than one query.
Flattened Nested Case Table
 The key word Flattened is useful in many areas of DMX—it’s used many times in thisbook whenever there is a nested table in the query results. Here, we are flattening orexpanding the Subcategories nested table seen in the previous query.
Syntax
-- select flattened all cases from structureselect flattened * from mining structure [customer mining].cases
Result
Analysis
 There are now six records for Jon V. Yang instead of the single record as in the lastquery. Jon V. Yang is an individual customer, and his data (for example, his education) isused for the Customer Clusters (clustering or profiling) data mining model that is part
ch01.indd 36/17/10 5:04:05 PM

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->