LIBNAME olapsio BASE "\\olap\tmp\libolap" ;
PROC OLAP
CUBE = "/Shared Data/OLAPSchemas/OrderCube"
PATH = 'c:\v9cubes'
DESCRIPTION = 'starschemacube'
FACT = olapsio.ORDER_FACT
;
METASVR
HOST = "J12345.na.abc.com"
PORT = 8561
OLAP_SCHEMA = "SASApp - OLAP Schema";
DIMENSION Customers
CAPTION = 'Customers'
SORT_ORDER = ASCENDING
DIMTBL = olapsio.CUSTDIM
DIMKEY = Customer_Id
FACTKEY = Customer_ID
HIERARCHIES = (
Customers
) /* HIERARCHIES */;
HIERARCHY Customers
ALL_MEMBER = 'All Customers'
CAPTION = 'Customers'
LEVELS = (
Customer_Type Customer_Group
Customer_Gender Customer_Age
) /* LEVELS */
DEFAULT;
LEVEL Customer_Type
CAPTION = 'Customer Type'
SORT_ORDER = ASCENDING;
LEVEL Customer_Group
CAPTION = 'Customer Group'
SORT_ORDER = ASCENDING;
LEVEL Customer_Gender
FORMAT = $GENDER.
CAPTION = 'Customer Gender'
SORT_ORDER = ASCENDING;
LEVEL Customer_Age
CAPTION = 'Customer Age'
SORT_ORDER = ASCENDING;
DIMENSION Geography
CAPTION = 'Geography'
TYPE = GEO
SORT_ORDER = ASCENDING
DIMTBL = olapsio.GEOGDIM
DIMKEY = Street_Id
FACTKEY = Street_ID
HIERARCHIES = (
Geography
) /* HIERARCHIES */;
HIERARCHY Geography
ALL_MEMBER = 'All Geography'
CAPTION = 'Geography'
LEVELS = (
Country Region State
) /* LEVELS */
DEFAULT;
LEVEL Country
FORMAT = $COUNTRY.
CAPTION = 'Country'
SORT_ORDER = ASCENDING;
LEVEL Region
CAPTION = 'Region Name'
SORT_ORDER = ASCENDING;
LEVEL State
CAPTION = 'State'
SORT_ORDER = ASCENDING;
DIMENSION Organization
CAPTION = 'Organization'
SORT_ORDER = ASCENDING
DIMTBL = olapsio.ORGDIM
DIMKEY = Employee_Id
FACTKEY = Employee_ID
HIERARCHIES = (
Organization
) /* HIERARCHIES */;
HIERARCHY Organization
ALL_MEMBER = 'All Organization'
CAPTION = 'Organization'
LEVELS = (
Company Group Department
) /* LEVELS */
DEFAULT;
LEVEL Company
CAPTION = 'Company'
SORT_ORDER = ASCENDING;
LEVEL Group
CAPTION = 'Group'
SORT_ORDER = ASCENDING;
LEVEL Department
CAPTION = 'Department'
SORT_ORDER = ASCENDING;
DIMENSION Product
CAPTION = 'Product'
SORT_ORDER = ASCENDING
DIMTBL = olapsio.PRODIM
DIMKEY = Product_ID
FACTKEY = Product_ID
HIERARCHIES = (
Product
) /* HIERARCHIES */;
HIERARCHY Product
ALL_MEMBER = 'All Product'
CAPTION = 'Product'
LEVELS = (
Product_Category Product_Group Product_Line
) /* LEVELS */
DEFAULT;
LEVEL Product_Category
CAPTION = 'Product Category'
SORT_ORDER = ASCENDING;
LEVEL Product_Group
CAPTION = 'Product Group'
SORT_ORDER = ASCENDING;
LEVEL Product_Line
CAPTION = 'Product Line'
SORT_ORDER = ASCENDING;
DIMENSION Time
CAPTION = 'Time'
TYPE = TIME
SORT_ORDER = ASCFORMATTED
DIMTBL = olapsio.TIMEDIM
DIMKEY = Date
FACTKEY = Order_Date
HIERARCHIES = (
Time
) /* HIERARCHIES */;
HIERARCHY Time
ALL_MEMBER = 'null'
LEVELS = (
Year Quarter Month
) /* LEVELS */
DEFAULT;
LEVEL Year
COLUMN = Date
FORMAT = YEAR4.
TYPE = YEAR
CAPTION = 'Year'
SORT_ORDER = ASCFORMATTED;
LEVEL Quarter
COLUMN = Date
FORMAT = QTR1.
TYPE = QUARTERS
CAPTION = 'Quarter'
SORT_ORDER = ASCFORMATTED;
LEVEL Month
COLUMN = Date
FORMAT = MONNAME9.
TYPE = MONTHS
CAPTION = 'Month'
SORT_ORDER = ASCFORMATTED;
PROPERTY Ages
LEVEL = Customer_Age
COLUMN = Customer_Birth_Date
CAPTION = 'Customer Birth Date'
HIERARCHY = (
Customers
) /* HIERARCHIES */;
MEASURE Total_Retail_PriceMAX
STAT = MAX
COLUMN = Total_Retail_Price
CAPTION = 'Maximum Total_Retail_Price'
FORMAT = DOLLAR13.2
DEFAULT;
MEASURE Total_Retail_PriceAVG
STAT = AVG
COLUMN = Total_Retail_Price
CAPTION = 'Average Total_Retail_Price'
FORMAT = DOLLAR13.2;
MEASURE CostPrice_Per_UnitMAX
STAT = MAX
COLUMN = CostPrice_Per_Unit
CAPTION = 'Maximum CostPrice_Per_Unit'
FORMAT = DOLLAR13.2;
MEASURE CostPrice_Per_UnitAVG
STAT = AVG
COLUMN = CostPrice_Per_Unit
CAPTION = 'Average CostPrice_Per_Unit'
FORMAT = DOLLAR13.2;
AGGREGATION /* Default */
/* levels */
Company Country Customer_Age Customer_Gender Customer_Group
Customer_Type Department Group Month Product_Category
Product_Group Product_Line Quarter
Region State Year
/ /* options */
NAME = 'Default';
AGGREGATION /* ProductCustomer */
/* levels */
Customer_Type Customer_Group Customer_Gender
Customer_Age Product_Category
/ /* options */
NAME = 'ProductCustomer';
FORMAT Customer_Birth_Date DATE9.;
RUN;