chapter 6 sas ® olap cube studio. section 6.1 sas olap cube studio architecture
TRANSCRIPT
Chapter 6
SAS® OLAP Cube Studio
Section 6.1
SAS OLAP Cube Studio Architecture
3
What Is OLAP?OLAP (Online Analytical Processing) is a software technology that enables users to dynamically analyze data that is stored in multidimensional database tables.
Because of the way the data and its relationships are stored, they are readily available for detailed queries and analysis.
4
What Is OLAP?Central to the OLAP storage process are cubes. A cube is a set of data that is organized and structured in a hierarchical, multidimensional arrangement, often with numerous dimensions and levels of data.
5
What Is OLAP?The classification information in the data is organized into dimensions.
For example, a TIME dimension might have all input columns related to time (date, month, year) grouped as levels.
Dimension levels can then be organized into a hierarchy. The hierarchy determines the logical order of the levels in a dimension. The logical order makes it possible for users to drill down into the cube data.
6
What Is OLAP?Cubes also contain measures, which are based on numeric analysis columns in the input tables.
These numeric values are summarized and stored in the cube for quick access and analysis during a query.
Examples of measures include sales figures and operational costs.
7
What Is SAS OLAP Cube Studio?The SAS OLAP Cube Studio is a Java interface for defining and building OLAP cubes in SAS®9.
The Cube Designer wizard, which guides the user through the process of creating and registering a cube, is the main feature of SAS OLAP Cube Studio and is also available in SAS ETL Studio.
8
What Is SAS OLAP Cube Studio?Other tasks that can be performed using the SAS OLAP Cube Studio include defining OLAP schemas in a SAS Metadata
Repository registering library definitions for the tables used to
build cubes registering the tables used to build cubes editing cube structure deleting cubes adding and deleting aggregations viewing cube properties.
9
Interaction with SAS Application ServersSAS OLAP Cube Studio uses different types of application servers:
SAS Metadata SAS Metadata ServerServer
Required for purposes of creating and Required for purposes of creating and managing metadata for both the cube managing metadata for both the cube and the processes for building the and the processes for building the cube.cube.
SAS Workspace SAS Workspace ServerServer
Used to generate and submit SAS Used to generate and submit SAS code, and to access information code, and to access information about SAS resources (that is, source about SAS resources (that is, source tables) for the cube.tables) for the cube.
...
10
NWAY Aggregation Concept (Optional)OLAP cubes usually contain an NWAY aggregation. The NWAY aggregation can be thought of as a table that contains the crossing of all dimension levels of the OLAP cube.
Example: Examine the concept of the NWAY aggregation by discussing a summary table created from the SUMMARY procedure.
11
SalesPerson Month Units SalesAmountJodi LeeJodi LeeJodi LeeJodi LeeJodi LeeJodi LeeTodd MunchTodd MunchTodd MunchTodd MunchTodd MunchTodd Munch
112233112233
647586735795
300200350250400300350150250350450250
NWAY Aggregation Concept (Optional)SalesData table:
12
NWAY Aggregation Concept (Optional)The SalesData table can be summarized using the SUMMARY procedure, and the summary information output to a new table called SalesSummary.
proc summary data=SalesData; class SalesPerson Month; var Units SalesAmount; output out=SalesSummary sum=TotalUnits TotalSales;run;
13
NWAY Aggregation Concept (Optional)A simple listing of the new summary table, SalesSummary, can be created with a PROC PRINT step.
proc print data=SalesSummary;run;
14
Sales Total TotalObs Person Month _TYPE_ _FREQ_ Units Sales
JLeeTMunchJLeeJLeeJLeeTMunchTMunchTMunch
011122333333
12 4 4 4 6 6 2 2 2 2 2 2
722024283636101214101214
1 2 3 4 5 6 7 8 9101112
.123..123123
360010001200140018001800 500 600 700 500 600 700
NWAY Aggregation Concept (Optional)SalesSummary table:
15
NWAY Aggregation Concept (Optional)The _TYPE_ variable values display different types of summarizations.
1 0 12 72 3600
Review _TYPE_=0 (observation 1) in the SalesSummary table.
This observation displays summarizations for no particular SalesPerson OR Month; therefore, this summarization is overall summarizations for the entire data set.
Sales Total TotalObs Person Month _TYPE_ _FREQ_ Units Sales
16
Review _TYPE_=1 (observations 2 - 4).
These observations display summarizations for each distinct Month across all SalesPerson values.
2 1 1 4 20 1000 3 2 1 4 24 1200 4 3 1 4 28 1400
NWAY Aggregation Concept (Optional)
Sales Total TotalObs Person Month _TYPE_ _FREQ_ Units Sales
17
Review _TYPE_=2 (observations 5 - 6).
These observations display summarizations for each distinct SalesPerson across all Month values.
5 JLee 2 6 36 1800 6 TMunch 2 6 36 1800
NWAY Aggregation Concept (Optional)
Sales Total TotalObs Person Month _TYPE_ _FREQ_ Units Sales
18
Review _TYPE_=3 (observations 7 - 12).
These observations display summarizations for each distinct SalesPerson broken down by Month values.
7 JLee 1 3 2 10 500 8 JLee 2 3 2 12 600 9 JLee 3 3 2 14 70010 TMunch 1 3 2 10 50011 TMunch 2 3 2 12 60012 TMunch 3 3 2 14 700
NWAY Aggregation Concept (Optional)
Sales Total TotalObs Person Month _TYPE_ _FREQ_ Units Sales
19
NWAY Aggregation Concept (Optional)For the _TYPE_=3 observations, notice that observations 7 through 9 can be summarized to obtain the values for observation 5.
Similarly, observations 10 through 12 can be summarized to obtain the values for observation 6.
22
5 JLee 2 6 36 1800 6 TMunch 2 6 36 1800
7 JLee 1 3 2 10 500 8 JLee 2 3 2 12 600 9 JLee 3 3 2 14 70010 TMunch 1 3 2 10 50011 TMunch 2 3 2 12 60012 TMunch 3 3 2 14 700
Sales Total TotalObs Person Month _TYPE_ _FREQ_ Units Sales
Sales Total TotalObs Person Month _TYPE_ _FREQ_ Units Sales
...
23
NWAY Aggregation Concept (Optional)In addition to the previous example, notice that the _TYPE_=3 observations 7 and 10 can be summarized to obtain the values for observation 2.
Similarly, observations 8 and 11 can be summarized to obtain the values for observation 3, and observations 9 and 12 can be summarized to obtain the values for observation 4.
27
2 1 1 4 20 1000 3 2 1 4 24 1200 4 3 1 4 28 1400
7 JLee 1 3 2 10 500 8 JLee 2 3 2 12 600 9 JLee 3 3 2 14 700 10 TMunch 1 3 2 10 500 11 TMunch 2 3 2 12 600 12 TMunch 3 3 2 14 700
Sales Total TotalObs Person Month _TYPE_ _FREQ_ Units Sales
Sales Total TotalObs Person Month _TYPE_ _FREQ_ Units Sales
...
28
proc summary data=SalesData NWAY; class SalesPerson Month; var Units SalesAmount; output out=SalesSummary sum=TotalUnits TotalSales;run;
NWAY Aggregation Concept (Optional)If the NWAY option is used in the PROC SUMMARY statement ...
continued...
29
NWAY Aggregation Concept (Optional)... the generated output table contains only the values where _TYPE_=3.
1 JLee 1 3 2 10 500 2 JLee 2 3 2 12 600 3 JLee 3 3 2 14 700 4 TMunch 1 3 2 10 500 5 TMunch 2 3 2 12 600 6 TMunch 3 3 2 14 700
Sales Total TotalObs Person Month _TYPE_ _FREQ_ Units Sales
30
NWAY Aggregation Concept (Optional)The NWAY aggregation in an OLAP cube is similar to the output table that is generated from a PROC SUMMARY step using the NWAY option.
All other aggregations in an OLAP cube can be generated from the NWAY aggregation.
Section 6.2
The SAS OLAP Cube Studio Interface
32
SAS OLAP Cube Studio: The InterfaceWhen connected to a SAS Metadata Server, the main window of the SAS OLAP Cube Studio displays cube information specific to that metadata server.
All cube administration tasks, such as creating and updating cubes, are initiated from this window.
The main window has six main visual components: the menu bar the toolbar the shortcut bar the navigation tree the status bar the messages window.
33
Tools, Menus, and Online HelpThe toolbar and pull-down menus provide fast access to a set of selected commands. The icons available on the toolbar depend on which window is active from within the interface.
Menus and Tools
34
The Shortcut BarThe Shortcut bar is populated with icons for each task an OLAP user would typically perform:
Shortcut Bar
...
35
The Shortcut BarThe Shortcut bar is populated with icons for each task an OLAP user would typically perform:
OptionsOptions Used to change the selected SAS Used to change the selected SAS Application Server and to test the Application Server and to test the connection to a logical SAS connection to a logical SAS Workspace Server.Workspace Server.
Create OLAP Create OLAP SchemaSchema
Used for creating new OLAP Used for creating new OLAP schemas.schemas.
Source Source DesignerDesigner
Used to design new source tables in a Used to design new source tables in a metadata repository.metadata repository.
Cube DesignerCube Designer Used to define and build a new cube.Used to define and build a new cube.
...
36
Navigation TreeThe navigation tree displays an organized list of the cubes, OLAP schemas, and tables registered in the selected SAS Metadata Repository.
Navigation Tree
Navigation Tree
37
Status BarThe status bar is located at the bottom of the SAS OLAP Cube Studio application window. It displays short status messages for the application.
Status BarStatus Bar
38
Messages WindowThe Messages window displays application messages such as: Application Server Error: Attempted connection to Application Server failed.
Verify that the server is running.
To resize the Messages window, use your mouse to drag the top edge of the window up or down. When you close the window, your resized setting is saved.
To toggle the display of the Messages window, select
View Message Window.
39
Messages Window
Messages Window
Messages Window
40
Using the Cube Designer WizardThe Cube Designer wizard is used to create and edit cube definitions that are stored in the
active metadata repository build cubes based on the stored definitions.
41
Using the Cube Designer WizardThe General window is used to specify the cube’s name and description. You also select a storage location for the cube’s definition and a storage location for the physical cube.
42
Using the Cube Designer WizardOn the Input window, you specify the data source that provides the input data for your cube by selected an already registered data source or by defining a new data source.
43
Using the Cube Designer WizardThe Drill-Through window is used to specify an optional drill-through table. Drill-through tables can be used by client applications to provide a view from processed data into the underlying data source.
44
Using the Cube Designer WizardFrom this wizard window you launch the Dimension Designer wizard to define the cube’s dimensions and their associated hierarchies and levels.
...
45
Dimensions, Hierarchies, and Levels
DimensionDimension a group of closely related hierarchies. a group of closely related hierarchies.
HierarchyHierarchy an arrangement of members of a an arrangement of members of a dimension into levels that are based on dimension into levels that are based on parent-child relationships. Each hierarchy parent-child relationships. Each hierarchy provides a navigational path that enables provides a navigational path that enables users to drill down to increasing levels of users to drill down to increasing levels of detail.detail.
LevelLevel an element of a dimension hierarchy. an element of a dimension hierarchy. Levels describe the dimension from the Levels describe the dimension from the highest (most summarized) level to the highest (most summarized) level to the lowest (most detailed) level.lowest (most detailed) level.
...
46
Using the Cube Designer WizardThe Member Property window is where you can add, modify, and delete member properties for the levels in the cube.
47
Using the Cube Designer WizardIn the Generated Aggregations window, you define aggregations to be generated for the cube in addition to whether the NWAY aggregation (the crossing of all dimension levels) is automatically generated.
48
Using the Cube Designer WizardThe Finish window is where you review the details of the cube that you just defined and choose whether to only save the cube’s definition to the active metadata repository, or to save the cube's definition and buildthe cube.
...
49
SAS OLAP Cube Studio Case Study TasksGoal: Build a cube in order to examine trends in length of
delivery over time and for different types of orders.
OrderFact OrionStar
Time DimensionOrder_YearOrder_Qtr Order_Month
Product DimensionOrder_TypeProduct_IDMeasures
Delivery_Time: Average Minimum Maximum
Quantity: Average
Total_Retail_Price: Sum
...
50
This demonstration illustrates building a cube using SAS OLAP Cube Studio.
Building a Cube
Register Source Tables
DefineData Libraries
CreateETL Jobs
DefineTarget Tables
CreateOLAP Cubes
View and AnalyzeData
CreateStored Processes
Create Reports
CreateInformation Maps
Use the InformationDelivery Portal
Metadata
51
This exercise reinforces the concepts discussed previously.
Exercises
Register Source Tables
DefineData Libraries
CreateETL Jobs
DefineTarget Tables
CreateOLAP Cubes
View and AnalyzeData
CreateStored Processes
Create Reports
CreateInformation Maps
Use the InformationDelivery Portal
Metadata
Section 6.3
SAS OLAP Cube Studio and Microsoft Excel
53
Viewing Cube DataIn SAS®9 there are several options for viewing cube data including: SAS Enterprise Guide 3 the SAS Information Delivery Portal’s Visual Data
Explorer portlet the SAS Web OLAP Viewer for Java Microsoft Excel Pivot Tables.
This section shows how to use Microsoft Excel to view a SAS OLAP cube.
54
Setting Cube PermissionsWhile the metadata about the cube is available to all users by default, the data in the cube itself is not.
Permissions must be added manually for the desired group of users to be able to display the cube data.
These permissions are granted using SAS Management Console.
55
This demonstration illustrates setting the appropriate permissions on a cube using the SAS Management Console so that users can view the cube data.
Setting Cube Permissions
56
This demonstration illustrates the necessary steps so users can view the cube data via Microsoft Excel.
Importing the Cube into Microsoft Excel
57
This exercise reinforces the concepts discussed previously.
Exercises