Presentation is loading. Please wait.

Presentation is loading. Please wait.

Building the cube – Chapter 9 & 10 Let’s be over with it.

Similar presentations


Presentation on theme: "Building the cube – Chapter 9 & 10 Let’s be over with it."— Presentation transcript:

1 Building the cube – Chapter 9 & 10 Let’s be over with it

2 Two  SSMS (SQL Server Management Studio) Important for any tasks deals with databases Use this to make sure the MaxMinMangufactureingDM database is in working order, follow the instructions I posted It is a Data Mart  SSDT (SQL Server Data Tool) Essentially Visual Studio 2010 Creating a Multidimensional BI Semantic Model (OLAP) and DM projects use the same tool

3 Key Steps  1 – need to know where to find this tool, you may have to start a new project

4 Key steps  1 – may want to find the right directory to store your projects  8 – you may have to create a new connection

5 Key Steps  8 – Impersonation, pick the first one You can have multiple data sources for the same project

6 Measures and related  Measure Group The table where the measure comes from The data in the table is the source for the measure

7 Other factors to consider  Granularity How detailed view do we need  Day, month, quarter, year, etc.  Professor, department, division, college, university  Calculated measures New measures generated through calculations with existing ones For example, the total goods produced = goods passed QA + goods failed QA Step 24 of page 345 is another one.

8 Measure Aggregates beside SUM  Look into AggregateFunction property, you will see a list of selections because not all aggregates are just sum  For example, inventory level is not additive along the time dimension, but additive along the product dimension

9 Aggregate Functions Selection Description SumSpecifies the sum of members. This is the default aggregation function. CountSpecifies the count of measure members. MinSpecifies the minimum value of members. MaxSpecifies the maximum value of members. DistinctCountSpecifies the count of distinct measure members. None No aggregations are performed on any dimension – data is only available on the leaf cells. If no value from the fact table has been read in for a member, then the cell value for the member is considered to be Null. ByAccount Specifies that the aggregation used will be determined for each CurrentMember of the Account dimension according to its account type. Unmapped account types aggregate as SUM. AverageOfChildren Specifies average of leaf descendants in time. Average does not count an empty value as 0. FirstChildSpecifies the first child member along Time dimension. LastChildSpecifies the last child member along Time dimension. FirstNonEmptySpecifies the first non empty child member along Time dimension. LastNonEmptySpecifies the last non empty child member along Time dimension.

10 Adding new measure group  True we can add new measure groups, but generally believe is to plan ahead and add all measure groups at the very beginning.  What is a measure group? It is basically a fact table

11 Types of dimensions  Fact dimensions Dimensions come from the fact table  Parent Child dimensions Two columns in the same table Self reference For example, employees and managers both come from the employee table

12 Types of dimensions  Role playing dimensions The same dimension can related to multiple columns multiple times For example, a time dimension can related to a sales measure group several times, order date, shipment date, received date, payment received date

13 Types of dimensions  Reference dimensions It related to the measure group through another dimension In the case below, Geography dimension is related to InternetSales through Customer, therefor is a reference dimension

14 DM dimensions, M:N dimension, and Slowly changing dimension  The values of the dimension come from data mining algorithms  Many-to-Many dimension Not to use  Slowly changing dimension Type 1 Type 2 Type 3

15 Slowly Changing Dimension  As the name suggest An employee got promoted in Dec of 2012, she is not the GM, but was a vendor manager before, how to reflect that? There are many ways to deal with this. We introduce three common approaches names Type I, II, and III.  The discussions here are based on Wikipedia

16 Slowly Changing Dimension – type I  Before  After  Then, the “After” info is all you going to see Supplier_KeySupplier_CodeSupplier_NameSupplier_State 123ABCAcme Supply CoCA Supplier_KeySupplier_CodeSupplier_NameSupplier_State 123ABCAcme Supply CoIL

17 Slowly Changing Dimension – type II  Before  After  Then, add additional info Supplier_KeySupplier_CodeSupplier_NameSupplier_State 123ABCAcme Supply CoCA Supplier_KeySupplier_CodeSupplier_NameSupplier_State 123ABCAcme Supply CoIL Supplier_KeySupplier_CodeSupplier_NameSupplier_StateVersion. 123ABCAcme Supply CoCA0 124ABCAcme Supply CoIL1 Supplier_KeySupplier_CodeSupplier_NameSupplier_StateStart_DateEnd_Date 123ABCAcme Supply CoCA01-Jan-200021-Dec-2004 124ABCAcme Supply CoIL22-Dec-2004

18 Slowly Changing Dimension – type III  Before  After  Then, add additional info Supplier_KeySupplier_CodeSupplier_NameSupplier_State 123ABCAcme Supply CoCA Supplier_KeySupplier_CodeSupplier_NameSupplier_State 123ABCAcme Supply CoIL upplier _Key Supplier _Code Supplier_Name Original_ Supplier _State Effective_ Date Current_Supplier_ State 123ABC Acme Supply Co CA 22-Dec- 2004 IL

19 Slowly Changing Dimension – type IV  Type IV  Type II

20 SCD– another example  Per http://www.learndatamodeling.comhttp://www.learndatamodeling.com  First price  Second price

21 SCD– another example Type I  Use the second price to replace all the first one, actually the first will not be in the DM

22 SCD– another example Type II  Approach I – use product ID and Year as key  Approach II, convert year to Effective DT

23 SCD– another example Type III  Add, previous price and year

24 The difference Between Type III and Type II  When we add more product price change, Type II can be unlimited in handling the changes by just adding records Type III can only handle a limit changes, let it be the first and last, the last two, or some others

25 Deploying and Processing  Deploying Send your definitions to the Analysis Services  Processing Perform the all prescribed calculations  Tools are MSDT – to deploy and process (trigger these activities) SSMS – to check the results Analysis Services Deployment Wizard – a more advanced tool that generate script for automated deployment to production -- skip

26 Other Bells and Whistles  Linked Object – especially linked measures Allowed to combine other cubes to an existing one  BI wizard A tool allows you to do a number of capability easily  Define time intelligence Period to date calculation, rolling average, period-over-period growth  Define currency conversion

27 Other Bells and Whistles  KPI The dashboard to indicate how things are going  Actions Making cube even fancier by allowing other activities such as following a URL, allowing drill- through, or launching a Reporting Service report  Partitions Break one cube to several cubes for concurrent processing to improve performance  Partitions and storage options MOLAP, ROLAP

28 Other Bells and Whistles  Aggregation Design How much aggregation is performed Two approaches: usage based or manual Usage based is determined by checking the usage log Manual is where the developers specify  Perspectives – very much like views  Translations – at metadata level


Download ppt "Building the cube – Chapter 9 & 10 Let’s be over with it."

Similar presentations


Ads by Google