Professional Documents
Culture Documents
1. 2.
SAS MANAGEMENT CONSOLE REGISTER METADATA PROFILE ...................................................... 6 1. 2. 3. 4. METADATA REPOSITORY ......................................................................................................................... 10 SUPPORT FOR DEV/TEST AND PROD ENVIRONMENT IN DI STUDIO ............................................................. 10 SAS DI STUDIO PROCESS ........................................................................................................................ 11 ORION STAR DATA PROCESS IN SAS DI STUDIO ....................................................................................... 12
BUILDING A CUSTOM TREE ........................................................................................................................ 18 DEFINE SOURCE DATA ................................................................................................................................. 22 DEFINE TARGET DATA ................................................................................................................................. 26 CREATE FACT & DIMENSION TABLES ................................................................................................................ 27 1. CREATE FACT TABLE (ORDERFACT) ..................................................................................................... 27 2. PRODUCT DIMENSION (PRODDIM) ........................................................................................................... 35 3. CUSTOMER DIMENSION (CUSTDIM) ......................................................................................................... 38 4. ORGANIZATION DIMENSION (ORGDIM) .................................................................................................... 39 5. TIME DIMENSION (TIMEDIM) ................................................................................................................... 41 6. GEOGRAPHIC DIMENSION (GEODIM)........................................................................................................ 42 DEFINING THE PRIMARY AND FOREIGN KEYS ...................................................................................... 43 1. 2. DEFINE PRIMARY FOR DIMENSION T ABLES............................................................................................... 43 DEFINE PRIMARY KEY FOR FACT TABLE ............................................... ERROR! BOOKMARK NOT DEFINED.
DI PROCESS LIBRARY (TRANSFORMATIONS IN DI STUDIO) ... ERROR! BOOKMARK NOT DEFINED. CREATE ETL JOBS AND LOAD THE TARGET DATA ................... ERROR! BOOKMARK NOT DEFINED. 1. 2. 3. 4. 5. POPULATE THE FACT TABLE (ORDER FACT) .......................................... ERROR! BOOKMARK NOT DEFINED. POPULATE THE PRODUCT DIMENSION (PRODDIM) ................................. ERROR! BOOKMARK NOT DEFINED. POPULATE THE CUSTOMER DIMENSION (CUSTDIM) ............................... ERROR! BOOKMARK NOT DEFINED. POPULATE THE TIME DIMENSION (TIMEDIM) ........................................ ERROR! BOOKMARK NOT DEFINED. POPULATE THE ORGANIZATION DIMENSION (ORGDIM).......................... ERROR! BOOKMARK NOT DEFINED.
DEFINE OLAP CUBE ........................................................................... ERROR! BOOKMARK NOT DEFINED. 1. 2. POPULATE THE DETAIL T ABLE FOR OLAP (DETAILT ABLE) ................... ERROR! BOOKMARK NOT DEFINED. CREATE OLAP CUBE IN DI STUDIO (DWETLCUBE) ............................. ERROR! BOOKMARK NOT DEFINED.
VIEW OLAP DATA USING SAS-ADD IN FOR MS OFFICE ............ ERROR! BOOKMARK NOT DEFINED. VIEW OLAP DATA USING SAS OLAP VIEWER ............................. ERROR! BOOKMARK NOT DEFINED. VIEW OLAP DATA USING SAS ENTERPRISE GUIDE ................... ERROR! BOOKMARK NOT DEFINED. CREATE INFORMATION MAPS ....................................................... ERROR! BOOKMARK NOT DEFINED. VIEW OLAP DATA IN SAS WEB REPORT STUDIO ....................... ERROR! BOOKMARK NOT DEFINED. REFERENCES....................................................................................... ERROR! BOOKMARK NOT DEFINED.
Introduction
This course material provides an overview of SAS BI components and how the data is integrated between each tool (SAS DI Studio, SAS OLAP Cube Studio, SAS MS-Office, Information Map Studio and Web Report Studio). Orion Star data model is used across this course for creating the Relational and Dimensional Data Model and OLAP Cubes.
Select Next
Provide the Server Name, Port, UserId and Password and click Next
Click Finish
1. Metadata Repository
There are three types of Repository available in SAS as follows
1) Foundation 2) Custom 3) Project
Foundation will be the default repository and the other two repositories have dependent on the Foundation repository. Metadata administrator defines the repository for each user and provides the details for the user on the repository, user name etc Each user having a separate repository will ensure the authorization of the user for various activities in metadata server (For eg. SASADM user will be the default admin user having full access to the metadata server. A userid XYZ created for a project repository can be controlled by the SASADM and the access is restricted to use. Change management having the check-in and check-out for each ETL jobs are managed in SAS DI studio when a project repository created for each user.
By Default, SAS Management Console will login with Foundation Repository unless the user profile has assigned a default repository. SAS Main in Management Console lists out the SAS Servers installed and configured.
Defining Library Metadata in DI Studio Open SAS DI studio from Start->SAS->SAS ETL Studio
Enter Staging Library as the library name and description is optional. Click Next
Select SAS Main as the SAS Server and click Next and then click Finish
The new library is registered in Metadata server and displayed in the Libraries folder. Alternatively you can define the above process in SAS Management console for registering the library in Metadata server.
Right click Foundation and select New Group. Enter Source Tables as the name for the Group.
Repeat the above step again and enter Target Tables as the name for the Group. Once the steps completed, DI Studio will have the two groups available as shown below.
Click Source Designer and select SAS (All our source data for this case study are in SAS) as the source Data. Click Next
Select the tables Customer, Order and Order_item and click Next
DI Studio should have the all the table loaded as displayed above. Similar to that, Management Console reflects the tables in metadata server as below.
Repeat the above step (#4) to load the below listed tables
Customer_type Organization Product Staff Supplier Country County State Continent Postal_Code Geo_Type Street_Code
Click Target Designer Icon. A wizard opens to select the type of target table as shown below.
Additional Properties are optional and can be selected to specify notes, table attributes etc Type OrderFact and click Next
Select SAS as DBMS and Staging Library as Library and click Next
Column Name Order_ID Product_ID Quantity Total_Retail_Price Cost_Price_Per_Unit Discount Employee_ID Order_Type Order_date Delivery_Date Customer_ID Street_ID
Orders
Customer
Click Next
The New button is required to define any additional columns. Delete button removes the selected column. Select Define Indexes button
Click New and add Customer_ID as the index name. Drag the column Customer_ID to the newly created index as show above. Repeat the above step to add the indexes for Product_ID, Order_date, Order_ID, Street_ID and Employee_ID. The index definition should looks as below.
Select OK and click Next Select Target table as the Group and click Next as shown below
Expand the Target Table group in DI studio, the Order_Fact table should be listed as shown below.
Supplier
Supplier_Name Country Manually created Columns Product_Category (Char (25)) (These columns need to be Product_Group (Char(25)) created for the target table) Product_Line (Char(20))
Click Next To manually create columns, click New and add the column name and length as shown below
Create two simple index for the columns Product_ID and Product_Group as shown below.
a) Rename the following column names Country Gender Birth_date -> -> -> Customer_Country Customer_Gender Customer_Birth_date
Manager_Levels6 (Num(8)) a) Rename the following column names Country Org_Name Gender Birth_date -> -> -> -> Employee_Country Employee_Name Employee_Gender Employee_Birth_date
Final list of Source and Target table should have all the tables as mentioned below.
Repeat the above steps for other tables with the following parameters to define the primary key. Note: If the Primary Column is not found in any of the table mentioned below, it can be imported from the source table. GeoDim table needs Street_ID as the primary key column which is not available in the table. This column needs to be imported using the below steps.
Right Click GeoDim table and select Properties from the pop-up menu Select the Columns tab and select Import.
Select Source table folder and expand Street_code table and select Street_ID column as shown below and click OK
The column Street_ID is now added into the GeoDim table as shown below.