SPOOL ENABLE.LOG

CREATE TYPE CS_OLAP.CS_O_SHAW_SHAWCHAN8OBJ AS OBJECT (SHAWCHANNELS_ET  VARCHAR2(100),
SHAWCHANNELS_PARENT  VARCHAR2(100),
SHAWCHANNELS_GID  NUMBER(12),
SHAWCHANNELS_PARENTGID  NUMBER(12),
R2C RAW(32),
CHANNEL_Channel  VARCHAR2(100),
CHANNEL_C_Class  VARCHAR2(100),
CHANNEL_T_Total_Channel  VARCHAR2(100),
AW_MEMBER_ORDER NUMBER,
LONG_DESCRIPTION VARCHAR2(1000),
SHORT_DESCRIPTION VARCHAR2(1000) )

/
CREATE TYPE CS_OLAP.CS_O_SHAW_SHAWCHAN8TBL AS TABLE OF CS_OLAP.CS_O_SHAW_SHAWCHAN8OBJ

/
GRANT EXECUTE ON CS_OLAP.CS_O_SHAW_SHAWCHAN8OBJ TO PUBLIC
/
GRANT EXECUTE ON CS_OLAP.CS_O_SHAW_SHAWCHAN8TBL TO PUBLIC
/
CREATE OR REPLACE VIEW CS_OLAP.CS_O_SHAW_SHAWC_CHANN8VIEW AS SELECT * FROM  TABLE(CAST(OLAP_TABLE('CS_OLAP.SHAW duration session',
 'CS_OLAP.CS_O_SHAW_SHAWCHAN8TBL',
 ' ',
 '&(CS_OLAP.SHAW!olap_sys_limitmap(CS_OLAP.SHAW!olap_sys_viewdim ''CS_O_SHAW_SHAWC_CHANN8VIEW''))') AS CS_OLAP.CS_O_SHAW_SHAWCHAN8TBL))

/
execute CWM2_OLAP_TABLE_MAP.ADD_AWVIEW('CS_OLAP','CS_O_SHAW_SHAWC_CHANN8VIEW','R2C','CS_OLAP','SHAW');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWC_CHANN8VIEW', 'SHAWCHANNELS_ET', 'SHAWCHANNELS');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWC_CHANN8VIEW', 'SHAWCHANNELS_PARENT', 'SHAWCHANNELS_PARENTREL');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWC_CHANN8VIEW', 'CHANNEL_Channel', 'SHAWCHANNELS_FAMILYREL');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWC_CHANN8VIEW', 'CHANNEL_C_Class', 'SHAWCHANNELS_FAMILYREL');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWC_CHANN8VIEW', 'CHANNEL_T_Total_Channel', 'SHAWCHANNELS_FAMILYREL');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWC_CHANN8VIEW', 'SHAWCHANNELS_GID', 'SHAWCHANNELS_GID');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWC_CHANN8VIEW', 'SHAWCHANNELS_PARENTGID', 'SHAWCHANNELS_GID');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWC_CHANN8VIEW', 'AW_MEMBER_ORDER', 'SHAWCHANNELS_ORDER');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWC_CHANN8VIEW', 'LONG_DESCRIPTION', 'SHAWCHANNELS_LONG_DESCRIPTION');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWC_CHANN8VIEW', 'SHORT_DESCRIPTION', 'SHAWCHANNELS_SHORT_DESCRIPTION');
execute CWM2_OLAP_DIMENSION.CREATE_DIMENSION('CS_OLAP','SHAWCHANNELS','Channel','Channels','Channel','Channel',NULL);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWCHANNELS','DEFAULT_ORDER','DEFAULT_ORDER','DEFAULT_ORDER','DEFAULT_ORDER',0);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWCHANNELS','Long Description','Long_Description','Channel description','Channel description',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWCHANNELS','Short Description','Short_Description','Channel description','Channel description',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWCHANNELS','Grouping ID','Grouping ID','Grouping ID','Grouping ID',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWCHANNELS','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWCHANNELS','ET Key','ET Key','ET Key','ET Key',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWCHANNELS','Parent ET Key','Parent ET Key','Parent ET Key','Parent ET Key',1);
execute cwm2_olap_hierarchy.create_hierarchy('CS_OLAP','SHAWCHANNELS','CHANNELS','Standard','Standard','Standard','SOLVED LEVEL-BASED');
execute cwm2_olap_dimension.set_default_display_hierarchy('CS_OLAP','SHAWCHANNELS','CHANNELS');
execute cwm2_olap_level.create_level('CS_OLAP','SHAWCHANNELS','CHANNEL','Channel','Channel','Channel','Channel');
execute cwm2_olap_level.create_level('CS_OLAP','SHAWCHANNELS','CHANNEL_CLASS','Class','Class','Class','Class');
execute cwm2_olap_level.create_level('CS_OLAP','SHAWCHANNELS','CHANNEL_TOTAL','Total Channel','Total Channel','Total Channel','Total Channel');
execute cwm2_olap_level.add_level_to_hierarchy('CS_OLAP','SHAWCHANNELS','CHANNELS','CHANNEL_TOTAL',NULL);
execute cwm2_olap_level.add_level_to_hierarchy('CS_OLAP','SHAWCHANNELS','CHANNELS','CHANNEL_CLASS','CHANNEL_TOTAL');
execute cwm2_olap_level.add_level_to_hierarchy('CS_OLAP','SHAWCHANNELS','CHANNELS','CHANNEL','CHANNEL_CLASS');
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWCHANNELS','DEFAULT_ORDER','CHANNEL','DEFAULT_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER',0);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWCHANNELS','DEFAULT_ORDER','CHANNEL_CLASS','DEFAULT_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER',0);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWCHANNELS','DEFAULT_ORDER','CHANNEL_TOTAL','DEFAULT_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER',0);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWCHANNELS','Long Description','CHANNEL','Long Description','Long_Description','Channel description','Channel description',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWCHANNELS','Long Description','CHANNEL_CLASS','Long Description','Long_Description','Channel description','Channel description',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWCHANNELS','Long Description','CHANNEL_TOTAL','Long Description','Long_Description','Channel description','Channel description',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWCHANNELS','Short Description','CHANNEL','Short Description','Short_Description','Channel description','Channel description',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWCHANNELS','Short Description','CHANNEL_CLASS','Short Description','Short_Description','Channel description','Channel description',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWCHANNELS','Short Description','CHANNEL_TOTAL','Short Description','Short_Description','Channel description','Channel description',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWCHANNELS','Grouping ID','CHANNEL','Grouping ID','Grouping ID','Grouping ID','Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWCHANNELS','Parent Grouping ID','CHANNEL','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWCHANNELS','ET Key','CHANNEL','ET Key','ET Key','ET Key','ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWCHANNELS','Parent ET Key','CHANNEL','Parent ET Key','Parent ET Key','Parent ET Key','Parent ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWCHANNELS','Grouping ID','CHANNEL_CLASS','Grouping ID','Grouping ID','Grouping ID','Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWCHANNELS','Parent Grouping ID','CHANNEL_CLASS','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWCHANNELS','ET Key','CHANNEL_CLASS','ET Key','ET Key','ET Key','ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWCHANNELS','Parent ET Key','CHANNEL_CLASS','Parent ET Key','Parent ET Key','Parent ET Key','Parent ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWCHANNELS','Grouping ID','CHANNEL_TOTAL','Grouping ID','Grouping ID','Grouping ID','Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWCHANNELS','Parent Grouping ID','CHANNEL_TOTAL','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID',1) ;
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWCHANNELS','ET Key','CHANNEL_TOTAL','ET Key','ET Key','ET Key','ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWCHANNELS','Parent ET Key','CHANNEL_TOTAL','Parent ET Key','Parent ET Key','Parent ET Key','Parent ET Key',1);
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVEL('CS_OLAP','SHAWCHANNELS','CHANNELS','CHANNEL_TOTAL','CS_OLAP','CS_O_SHAW_SHAWC_CHANN8VIEW','CHANNEL_T_Total_Channel',NULL);
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVEL('CS_OLAP','SHAWCHANNELS','CHANNELS','CHANNEL_CLASS','CS_OLAP','CS_O_SHAW_SHAWC_CHANN8VIEW','CHANNEL_C_Class','CHANNEL_T_Total_Channel');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVEL('CS_OLAP','SHAWCHANNELS','CHANNELS','CHANNEL','CS_OLAP','CS_O_SHAW_SHAWC_CHANN8VIEW','CHANNEL_Channel','CHANNEL_C_Class');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWCHANNELS','DEFAULT_ORDER','CHANNELS','CHANNEL','DEFAULT_ORDER','CS_OLAP','CS_O_SHAW_SHAWC_CHANN8VIEW','AW_MEMBER_ORDER');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWCHANNELS','DEFAULT_ORDER','CHANNELS','CHANNEL_CLASS','DEFAULT_ORDER','CS_OLAP','CS_O_SHAW_SHAWC_CHANN8VIEW','AW_MEMBER_ORDER');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWCHANNELS','DEFAULT_ORDER','CHANNELS','CHANNEL_TOTAL','DEFAULT_ORDER','CS_OLAP','CS_O_SHAW_SHAWC_CHANN8VIEW','AW_MEMBER_ORDER');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWCHANNELS','Long Description','CHANNELS','CHANNEL','Long Description','CS_OLAP','CS_O_SHAW_SHAWC_CHANN8VIEW','LONG_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWCHANNELS','Long Description','CHANNELS','CHANNEL_CLASS','Long Description','CS_OLAP','CS_O_SHAW_SHAWC_CHANN8VIEW','LONG_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWCHANNELS','Long Description','CHANNELS','CHANNEL_TOTAL','Long Description','CS_OLAP','CS_O_SHAW_SHAWC_CHANN8VIEW','LONG_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWCHANNELS','Short Description','CHANNELS','CHANNEL','Short Description','CS_OLAP','CS_O_SHAW_SHAWC_CHANN8VIEW','SHORT_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWCHANNELS','Short Description','CHANNELS','CHANNEL_CLASS','Short Description','CS_OLAP','CS_O_SHAW_SHAWC_CHANN8VIEW','SHORT_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWCHANNELS','Short Description','CHANNELS','CHANNEL_TOTAL','Short Description','CS_OLAP','CS_O_SHAW_SHAWC_CHANN8VIEW','SHORT_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWCHANNELS','Grouping ID','CHANNELS','CHANNEL','Grouping ID','CS_OLAP','CS_O_SHAW_SHAWC_CHANN8VIEW','SHAWCHANNELS_GID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWCHANNELS','Parent Grouping ID','CHANNELS','CHANNEL','Parent Grouping ID','CS_OLAP','CS_O_SHAW_SHAWC_CHANN8VIEW','SHAWCHANNELS_PARENTGID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWCHANNELS','ET Key','CHANNELS','CHANNEL','ET Key','CS_OLAP','CS_O_SHAW_SHAWC_CHANN8VIEW','SHAWCHANNELS_ET');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWCHANNELS','Parent ET Key','CHANNELS','CHANNEL','Parent ET Key','CS_OLAP','CS_O_SHAW_SHAWC_CHANN8VIEW','SHAWCHANNELS_PARENT');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWCHANNELS','Grouping ID','CHANNELS','CHANNEL_CLASS','Grouping ID','CS_OLAP','CS_O_SHAW_SHAWC_CHANN8VIEW','SHAWCHANNELS_GID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWCHANNELS','Parent Grouping ID','CHANNELS','CHANNEL_CLASS','Parent Grouping ID','CS_OLAP','CS_O_SHAW_SHAWC_CHANN8VIEW','SHAWCHANNELS_PARENTGID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWCHANNELS','ET Key','CHANNELS','CHANNEL_CLASS','ET Key','CS_OLAP','CS_O_SHAW_SHAWC_CHANN8VIEW','SHAWCHANNELS_ET');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWCHANNELS','Parent ET Key','CHANNELS','CHANNEL_CLASS','Parent ET Key','CS_OLAP','CS_O_SHAW_SHAWC_CHANN8VIEW','SHAWCHANNELS_PARENT');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWCHANNELS','Grouping ID','CHANNELS','CHANNEL_TOTAL','Grouping ID','CS_OLAP','CS_O_SHAW_SHAWC_CHANN8VIEW','SHAWCHANNELS_GID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWCHANNELS','Parent Grouping ID','CHANNELS','CHANNEL_TOTAL','Parent Grouping ID','CS_OLAP','CS_O_SHAW_SHAWC_CHANN8VIEW','SHAWCHANNELS_PARENTGID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWCHANNELS','ET Key','CHANNELS','CHANNEL_TOTAL','ET Key','CS_OLAP','CS_O_SHAW_SHAWC_CHANN8VIEW','SHAWCHANNELS_ET');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWCHANNELS','Parent ET Key','CHANNELS','CHANNEL_TOTAL','Parent ET Key','CS_OLAP','CS_O_SHAW_SHAWC_CHANN8VIEW','SHAWCHANNELS_PARENT');
execute cwm2_olap_validate.validate_dimension('CS_OLAP', 'SHAWCHANNELS', 'OLAP API', 'NO');
execute cwm2_olap_metadata_refresh.mr_refresh();
commit
/
CREATE TYPE CS_OLAP.CS_O_SHAW_SHAWGEOG9OBJ AS OBJECT (SHAWGEOGRAPHIES_ET  VARCHAR2(100),
SHAWGEOGRAPHIES_PARENT  VARCHAR2(100),
SHAWGEOGRAPHIES_GID  NUMBER(12),
SHAWGEOGRAPHIES_PARENTGID  NUMBER(12),
R2C RAW(32),
COUNTRY_Country  VARCHAR2(100),
SUB_REGIO_Sub_Region  VARCHAR2(100),
TOTAL_Total_Geography  VARCHAR2(100),
REGION_Region  VARCHAR2(100),
AW_MEMBER_ORDER NUMBER,
LONG_DESCRIPTION VARCHAR2(1000),
SHORT_DESCRIPTION VARCHAR2(1000) )

/
CREATE TYPE CS_OLAP.CS_O_SHAW_SHAWGEOG9TBL AS TABLE OF CS_OLAP.CS_O_SHAW_SHAWGEOG9OBJ

/
GRANT EXECUTE ON CS_OLAP.CS_O_SHAW_SHAWGEOG9OBJ TO PUBLIC
/
GRANT EXECUTE ON CS_OLAP.CS_O_SHAW_SHAWGEOG9TBL TO PUBLIC
/
CREATE OR REPLACE VIEW CS_OLAP.CS_O_SHAW_SHAWG_STAND9VIEW AS SELECT * FROM  TABLE(CAST(OLAP_TABLE('CS_OLAP.SHAW duration session',
 'CS_OLAP.CS_O_SHAW_SHAWGEOG9TBL',
 ' ',
 '&(CS_OLAP.SHAW!olap_sys_limitmap(CS_OLAP.SHAW!olap_sys_viewdim ''CS_O_SHAW_SHAWG_STAND9VIEW''))') AS CS_OLAP.CS_O_SHAW_SHAWGEOG9TBL))

/
execute CWM2_OLAP_TABLE_MAP.ADD_AWVIEW('CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','R2C','CS_OLAP','SHAW');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWG_STAND9VIEW', 'SHAWGEOGRAPHIES_ET', 'SHAWGEOGRAPHIES');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWG_STAND9VIEW', 'SHAWGEOGRAPHIES_PARENT', 'SHAWGEOGRAPHIES_PARENTREL');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWG_STAND9VIEW', 'COUNTRY_Country', 'SHAWGEOGRAPHIES_FAMILYREL');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWG_STAND9VIEW', 'SUB_REGIO_Sub_Region', 'SHAWGEOGRAPHIES_FAMILYREL');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWG_STAND9VIEW', 'TOTAL_Total_Geography', 'SHAWGEOGRAPHIES_FAMILYREL');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWG_STAND9VIEW', 'REGION_Region', 'SHAWGEOGRAPHIES_FAMILYREL');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWG_STAND9VIEW', 'SHAWGEOGRAPHIES_GID', 'SHAWGEOGRAPHIES_GID');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWG_STAND9VIEW', 'SHAWGEOGRAPHIES_PARENTGID', 'SHAWGEOGRAPHIES_GID');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWG_STAND9VIEW', 'AW_MEMBER_ORDER', 'SHAWGEOGRAPHIES_ORDER');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWG_STAND9VIEW', 'LONG_DESCRIPTION', 'SHAWGEOGRAPHIES_LONG_DESCRIPTION');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWG_STAND9VIEW', 'SHORT_DESCRIPTION', 'SHAWGEOGRAPHIES_SHORT_DESCRIPTION');
execute CWM2_OLAP_DIMENSION.CREATE_DIMENSION('CS_OLAP','SHAWGEOGRAPHIES','Geography','Geographies','Geography','Geography',NULL);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','DEFAULT_ORDER','DEFAULT_ORDER','DEFAULT_ORDER','DEFAULT_ORDER',0);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','Long Description','Long_Description','Country name','Country name',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','Short Description','Short_Description','Country name','Country name',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','Grouping ID','Grouping ID','Grouping ID','Grouping ID',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','ET Key','ET Key','ET Key','ET Key',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','Parent ET Key','Parent ET Key','Parent ET Key','Parent ET Key',1);
execute cwm2_olap_hierarchy.create_hierarchy('CS_OLAP','SHAWGEOGRAPHIES','STANDARD','Standard','Standard','Standard','SOLVED LEVEL-BASED');
execute cwm2_olap_dimension.set_default_display_hierarchy('CS_OLAP','SHAWGEOGRAPHIES','STANDARD');
execute cwm2_olap_level.create_level('CS_OLAP','SHAWGEOGRAPHIES','COUNTRY','Country','Country','Country','Country');
execute cwm2_olap_level.create_level('CS_OLAP','SHAWGEOGRAPHIES','SUB_REGION','Sub Region','Sub Region','Sub Region','Sub Region');
execute cwm2_olap_level.create_level('CS_OLAP','SHAWGEOGRAPHIES','TOTAL','Total Geography','Total Geography','Total Geography','Total Geography');
execute cwm2_olap_level.create_level('CS_OLAP','SHAWGEOGRAPHIES','REGION','Region','Region','Region','Region');
execute cwm2_olap_level.add_level_to_hierarchy('CS_OLAP','SHAWGEOGRAPHIES','STANDARD','TOTAL',NULL);
execute cwm2_olap_level.add_level_to_hierarchy('CS_OLAP','SHAWGEOGRAPHIES','STANDARD','REGION','TOTAL');
execute cwm2_olap_level.add_level_to_hierarchy('CS_OLAP','SHAWGEOGRAPHIES','STANDARD','SUB_REGION','REGION');
execute cwm2_olap_level.add_level_to_hierarchy('CS_OLAP','SHAWGEOGRAPHIES','STANDARD','COUNTRY','SUB_REGION');
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','DEFAULT_ORDER','COUNTRY','DEFAULT_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER',0);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','DEFAULT_ORDER','SUB_REGION','DEFAULT_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER',0);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','DEFAULT_ORDER','TOTAL','DEFAULT_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER',0);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','DEFAULT_ORDER','REGION','DEFAULT_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER',0);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','Long Description','COUNTRY','Long Description','Long_Description','Country name','Country name',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','Long Description','SUB_REGION','Long Description','Long_Description','Country name','Country name',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','Long Description','TOTAL','Long Description','Long_Description','Country name','Country name',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','Long Description','REGION','Long Description','Long_Description','Country name','Country name',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','Short Description','COUNTRY','Short Description','Short_Description','Country name','Country name',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','Short Description','SUB_REGION','Short Description','Short_Description','Country name','Country name',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','Short Description','TOTAL','Short Description','Short_Description','Country name','Country name',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','Short Description','REGION','Short Description','Short_Description','Country name','Country name',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','Grouping ID','COUNTRY','Grouping ID','Grouping ID','Grouping ID','Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','Parent Grouping ID','COUNTRY','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','ET Key','COUNTRY','ET Key','ET Key','ET Key','ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','Parent ET Key','COUNTRY','Parent ET Key','Parent ET Key','Parent ET Key','Parent ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','Grouping ID','SUB_REGION','Grouping ID','Grouping ID','Grouping ID','Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','Parent Grouping ID','SUB_REGION','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','ET Key','SUB_REGION','ET Key','ET Key','ET Key','ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','Parent ET Key','SUB_REGION','Parent ET Key','Parent ET Key','Parent ET Key','Parent ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','Grouping ID','TOTAL','Grouping ID','Grouping ID','Grouping ID','Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','Parent Grouping ID','TOTAL','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','ET Key','TOTAL','ET Key','ET Key','ET Key','ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','Parent ET Key','TOTAL','Parent ET Key','Parent ET Key','Parent ET Key','Parent ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','Grouping ID','REGION','Grouping ID','Grouping ID','Grouping ID','Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','Parent Grouping ID','REGION','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','ET Key','REGION','ET Key','ET Key','ET Key','ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWGEOGRAPHIES','Parent ET Key','REGION','Parent ET Key','Parent ET Key','Parent ET Key','Parent ET Key',1);
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVEL('CS_OLAP','SHAWGEOGRAPHIES','STANDARD','TOTAL','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','TOTAL_Total_Geography',NULL);
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVEL('CS_OLAP','SHAWGEOGRAPHIES','STANDARD','REGION','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','REGION_Region','TOTAL_Total_Geography');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVEL('CS_OLAP','SHAWGEOGRAPHIES','STANDARD','SUB_REGION','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','SUB_REGIO_Sub_Region','REGION_Region');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVEL('CS_OLAP','SHAWGEOGRAPHIES','STANDARD','COUNTRY','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','COUNTRY_Country','SUB_REGIO_Sub_Region');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','DEFAULT_ORDER','STANDARD','COUNTRY','DEFAULT_ORDER','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','AW_MEMBER_ORDER');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','DEFAULT_ORDER','STANDARD','SUB_REGION','DEFAULT_ORDER','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','AW_MEMBER_ORDER');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','DEFAULT_ORDER','STANDARD','REGION','DEFAULT_ORDER','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','AW_MEMBER_ORDER');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','DEFAULT_ORDER','STANDARD','TOTAL','DEFAULT_ORDER','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','AW_MEMBER_ORDER');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','Long Description','STANDARD','COUNTRY','Long Description','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','LONG_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','Long Description','STANDARD','SUB_REGION','Long Description','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','LONG_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','Long Description','STANDARD','REGION','Long Description','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','LONG_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','Long Description','STANDARD','TOTAL','Long Description','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','LONG_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','Short Description','STANDARD','COUNTRY','Short Description','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','SHORT_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','Short Description','STANDARD','SUB_REGION','Short Description','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','SHORT_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','Short Description','STANDARD','REGION','Short Description','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','SHORT_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','Short Description','STANDARD','TOTAL','Short Description','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','SHORT_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','Grouping ID','STANDARD','COUNTRY','Grouping ID','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','SHAWGEOGRAPHIES_GID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','Parent Grouping ID','STANDARD','COUNTRY','Parent Grouping ID','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','SHAWGEOGRAPHIES_PARENTGID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','ET Key','STANDARD','COUNTRY','ET Key','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','SHAWGEOGRAPHIES_ET');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','Parent ET Key','STANDARD','COUNTRY','Parent ET Key','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','SHAWGEOGRAPHIES_PARENT');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','Grouping ID','STANDARD','SUB_REGION','Grouping ID','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','SHAWGEOGRAPHIES_GID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','Parent Grouping ID','STANDARD','SUB_REGION','Parent Grouping ID','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','SHAWGEOGRAPHIES_PARENTGID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','ET Key','STANDARD','SUB_REGION','ET Key','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','SHAWGEOGRAPHIES_ET');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','Parent ET Key','STANDARD','SUB_REGION','Parent ET Key','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','SHAWGEOGRAPHIES_PARENT');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','Grouping ID','STANDARD','REGION','Grouping ID','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','SHAWGEOGRAPHIES_GID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','Parent Grouping ID','STANDARD','REGION','Parent Grouping ID','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','SHAWGEOGRAPHIES_PARENTGID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','ET Key','STANDARD','REGION','ET Key','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','SHAWGEOGRAPHIES_ET');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','Parent ET Key','STANDARD','REGION','Parent ET Key','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','SHAWGEOGRAPHIES_PARENT');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','Grouping ID','STANDARD','TOTAL','Grouping ID','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','SHAWGEOGRAPHIES_GID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','Parent Grouping ID','STANDARD','TOTAL','Parent Grouping ID','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','SHAWGEOGRAPHIES_PARENTGID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','ET Key','STANDARD','TOTAL','ET Key','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','SHAWGEOGRAPHIES_ET');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWGEOGRAPHIES','Parent ET Key','STANDARD','TOTAL','Parent ET Key','CS_OLAP','CS_O_SHAW_SHAWG_STAND9VIEW','SHAWGEOGRAPHIES_PARENT');
execute cwm2_olap_validate.validate_dimension('CS_OLAP', 'SHAWGEOGRAPHIES', 'OLAP API', 'NO');
execute cwm2_olap_metadata_refresh.mr_refresh();
commit
/
CREATE TYPE CS_OLAP.CS_O_SHAW_SHAWPROD10OBJ AS OBJECT (SHAWPRODUCTS_ET  VARCHAR2(100),
SHAWPRODUCTS_PARENT  VARCHAR2(100),
SHAWPRODUCTS_GID  NUMBER(12),
SHAWPRODUCTS_PARENTGID  NUMBER(12),
R2C RAW(32),
TOTAL_Total_Product  VARCHAR2(100),
SUBCATEGO_Subcategory  VARCHAR2(100),
PRODUCT_Product  VARCHAR2(100),
CATEGORY_Category  VARCHAR2(100),
AW_MEMBER_ORDER NUMBER,
LONG_DESCRIPTION VARCHAR2(1000),
SHORT_DESCRIPTION VARCHAR2(1000) )

/
CREATE TYPE CS_OLAP.CS_O_SHAW_SHAWPROD10TBL AS TABLE OF CS_OLAP.CS_O_SHAW_SHAWPROD10OBJ

/
GRANT EXECUTE ON CS_OLAP.CS_O_SHAW_SHAWPROD10OBJ TO PUBLIC
/
GRANT EXECUTE ON CS_OLAP.CS_O_SHAW_SHAWPROD10TBL TO PUBLIC
/
CREATE OR REPLACE VIEW CS_OLAP.CS_O_SHAW_SHAWP_PRODU10VIEW AS SELECT * FROM  TABLE(CAST(OLAP_TABLE('CS_OLAP.SHAW duration session',
 'CS_OLAP.CS_O_SHAW_SHAWPROD10TBL',
 ' ',
 '&(CS_OLAP.SHAW!olap_sys_limitmap(CS_OLAP.SHAW!olap_sys_viewdim ''CS_O_SHAW_SHAWP_PRODU10VIEW''))') AS CS_OLAP.CS_O_SHAW_SHAWPROD10TBL))

/
execute CWM2_OLAP_TABLE_MAP.ADD_AWVIEW('CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','R2C','CS_OLAP','SHAW');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWP_PRODU10VIEW', 'SHAWPRODUCTS_ET', 'SHAWPRODUCTS');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWP_PRODU10VIEW', 'SHAWPRODUCTS_PARENT', 'SHAWPRODUCTS_PARENTREL');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWP_PRODU10VIEW', 'TOTAL_Total_Product', 'SHAWPRODUCTS_FAMILYREL');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWP_PRODU10VIEW', 'SUBCATEGO_Subcategory', 'SHAWPRODUCTS_FAMILYREL');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWP_PRODU10VIEW', 'PRODUCT_Product', 'SHAWPRODUCTS_FAMILYREL');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWP_PRODU10VIEW', 'CATEGORY_Category', 'SHAWPRODUCTS_FAMILYREL');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWP_PRODU10VIEW', 'SHAWPRODUCTS_GID', 'SHAWPRODUCTS_GID');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWP_PRODU10VIEW', 'SHAWPRODUCTS_PARENTGID', 'SHAWPRODUCTS_GID');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWP_PRODU10VIEW', 'AW_MEMBER_ORDER', 'SHAWPRODUCTS_ORDER');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWP_PRODU10VIEW', 'LONG_DESCRIPTION', 'SHAWPRODUCTS_LONG_DESCRIPTION');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWP_PRODU10VIEW', 'SHORT_DESCRIPTION', 'SHAWPRODUCTS_SHORT_DESCRIPTION');
execute CWM2_OLAP_DIMENSION.CREATE_DIMENSION('CS_OLAP','SHAWPRODUCTS','Product','Products','Product','Product',NULL);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWPRODUCTS','DEFAULT_ORDER','DEFAULT_ORDER','DEFAULT_ORDER','DEFAULT_ORDER',0);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWPRODUCTS','Long Description','Long_Description','Total','Total',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWPRODUCTS','Short Description','Short_Description','Total','Total',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWPRODUCTS','Grouping ID','Grouping ID','Grouping ID','Grouping ID',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWPRODUCTS','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWPRODUCTS','ET Key','ET Key','ET Key','ET Key',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWPRODUCTS','Parent ET Key','Parent ET Key','Parent ET Key','Parent ET Key',1);
execute cwm2_olap_hierarchy.create_hierarchy('CS_OLAP','SHAWPRODUCTS','PRODUCTS','Standard','Standard','Standard','SOLVED LEVEL-BASED');
execute cwm2_olap_dimension.set_default_display_hierarchy('CS_OLAP','SHAWPRODUCTS','PRODUCTS');
execute cwm2_olap_level.create_level('CS_OLAP','SHAWPRODUCTS','TOTAL','Total Product','Total Product','Total Product','Total Product');
execute cwm2_olap_level.create_level('CS_OLAP','SHAWPRODUCTS','SUBCATEGORY','Subcategory','Subcategory','Subcategory','Subcategory');
execute cwm2_olap_level.create_level('CS_OLAP','SHAWPRODUCTS','PRODUCT','Product','Product','Product','Product');
execute cwm2_olap_level.create_level('CS_OLAP','SHAWPRODUCTS','CATEGORY','Category','Category','Category','Category');
execute cwm2_olap_level.add_level_to_hierarchy('CS_OLAP','SHAWPRODUCTS','PRODUCTS','TOTAL',NULL);
execute cwm2_olap_level.add_level_to_hierarchy('CS_OLAP','SHAWPRODUCTS','PRODUCTS','CATEGORY','TOTAL');
execute cwm2_olap_level.add_level_to_hierarchy('CS_OLAP','SHAWPRODUCTS','PRODUCTS','SUBCATEGORY','CATEGORY');
execute cwm2_olap_level.add_level_to_hierarchy('CS_OLAP','SHAWPRODUCTS','PRODUCTS','PRODUCT','SUBCATEGORY');
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','DEFAULT_ORDER','TOTAL','DEFAULT_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER',0);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','DEFAULT_ORDER','SUBCATEGORY','DEFAULT_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER',0);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','DEFAULT_ORDER','PRODUCT','DEFAULT_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER',0);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','DEFAULT_ORDER','CATEGORY','DEFAULT_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER',0);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','Long Description','TOTAL','Long Description','Long_Description','Total','Total',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','Long Description','SUBCATEGORY','Long Description','Long_Description','Total','Total',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','Long Description','PRODUCT','Long Description','Long_Description','Total','Total',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','Long Description','CATEGORY','Long Description','Long_Description','Total','Total',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','Short Description','TOTAL','Short Description','Short_Description','Total','Total',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','Short Description','SUBCATEGORY','Short Description','Short_Description','Total','Total',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','Short Description','PRODUCT','Short Description','Short_Description','Total','Total',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','Short Description','CATEGORY','Short Description','Short_Description','Total','Total',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','Grouping ID','TOTAL','Grouping ID','Grouping ID','Grouping ID','Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','Parent Grouping ID','TOTAL','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','ET Key','TOTAL','ET Key','ET Key','ET Key','ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','Parent ET Key','TOTAL','Parent ET Key','Parent ET Key','Parent ET Key','Parent ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','Grouping ID','SUBCATEGORY','Grouping ID','Grouping ID','Grouping ID','Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','Parent Grouping ID','SUBCATEGORY','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','ET Key','SUBCATEGORY','ET Key','ET Key','ET Key','ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','Parent ET Key','SUBCATEGORY','Parent ET Key','Parent ET Key','Parent ET Key','Parent ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','Grouping ID','PRODUCT','Grouping ID','Grouping ID','Grouping ID','Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','Parent Grouping ID','PRODUCT','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','ET Key','PRODUCT','ET Key','ET Key','ET Key','ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','Parent ET Key','PRODUCT','Parent ET Key','Parent ET Key','Parent ET Key','Parent ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','Grouping ID','CATEGORY','Grouping ID','Grouping ID','Grouping ID','Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','Parent Grouping ID','CATEGORY','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','ET Key','CATEGORY','ET Key','ET Key','ET Key','ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPRODUCTS','Parent ET Key','CATEGORY','Parent ET Key','Parent ET Key','Parent ET Key','Parent ET Key',1);
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVEL('CS_OLAP','SHAWPRODUCTS','PRODUCTS','TOTAL','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','TOTAL_Total_Product',NULL);
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVEL('CS_OLAP','SHAWPRODUCTS','PRODUCTS','CATEGORY','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','CATEGORY_Category','TOTAL_Total_Product');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVEL('CS_OLAP','SHAWPRODUCTS','PRODUCTS','SUBCATEGORY','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','SUBCATEGO_Subcategory','CATEGORY_Category');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVEL('CS_OLAP','SHAWPRODUCTS','PRODUCTS','PRODUCT','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','PRODUCT_Product','SUBCATEGO_Subcategory');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','DEFAULT_ORDER','PRODUCTS','PRODUCT','DEFAULT_ORDER','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','AW_MEMBER_ORDER');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','DEFAULT_ORDER','PRODUCTS','SUBCATEGORY','DEFAULT_ORDER','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','AW_MEMBER_ORDER');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','DEFAULT_ORDER','PRODUCTS','CATEGORY','DEFAULT_ORDER','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','AW_MEMBER_ORDER');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','DEFAULT_ORDER','PRODUCTS','TOTAL','DEFAULT_ORDER','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','AW_MEMBER_ORDER');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','Long Description','PRODUCTS','PRODUCT','Long Description','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','LONG_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','Long Description','PRODUCTS','SUBCATEGORY','Long Description','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','LONG_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','Long Description','PRODUCTS','CATEGORY','Long Description','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','LONG_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','Long Description','PRODUCTS','TOTAL','Long Description','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','LONG_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','Short Description','PRODUCTS','PRODUCT','Short Description','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','SHORT_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','Short Description','PRODUCTS','SUBCATEGORY','Short Description','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','SHORT_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','Short Description','PRODUCTS','CATEGORY','Short Description','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','SHORT_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','Short Description','PRODUCTS','TOTAL','Short Description','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','SHORT_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','Grouping ID','PRODUCTS','PRODUCT','Grouping ID','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','SHAWPRODUCTS_GID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','Parent Grouping ID','PRODUCTS','PRODUCT','Parent Grouping ID','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','SHAWPRODUCTS_PARENTGID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','ET Key','PRODUCTS','PRODUCT','ET Key','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','SHAWPRODUCTS_ET');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','Parent ET Key','PRODUCTS','PRODUCT','Parent ET Key','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','SHAWPRODUCTS_PARENT');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','Grouping ID','PRODUCTS','SUBCATEGORY','Grouping ID','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','SHAWPRODUCTS_GID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','Parent Grouping ID','PRODUCTS','SUBCATEGORY','Parent Grouping ID','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','SHAWPRODUCTS_PARENTGID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','ET Key','PRODUCTS','SUBCATEGORY','ET Key','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','SHAWPRODUCTS_ET');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','Parent ET Key','PRODUCTS','SUBCATEGORY','Parent ET Key','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','SHAWPRODUCTS_PARENT');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','Grouping ID','PRODUCTS','CATEGORY','Grouping ID','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','SHAWPRODUCTS_GID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','Parent Grouping ID','PRODUCTS','CATEGORY','Parent Grouping ID','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','SHAWPRODUCTS_PARENTGID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','ET Key','PRODUCTS','CATEGORY','ET Key','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','SHAWPRODUCTS_ET');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','Parent ET Key','PRODUCTS','CATEGORY','Parent ET Key','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','SHAWPRODUCTS_PARENT');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','Grouping ID','PRODUCTS','TOTAL','Grouping ID','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','SHAWPRODUCTS_GID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','Parent Grouping ID','PRODUCTS','TOTAL','Parent Grouping ID','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','SHAWPRODUCTS_PARENTGID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','ET Key','PRODUCTS','TOTAL','ET Key','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','SHAWPRODUCTS_ET');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPRODUCTS','Parent ET Key','PRODUCTS','TOTAL','Parent ET Key','CS_OLAP','CS_O_SHAW_SHAWP_PRODU10VIEW','SHAWPRODUCTS_PARENT');
execute cwm2_olap_validate.validate_dimension('CS_OLAP', 'SHAWPRODUCTS', 'OLAP API', 'NO');
execute cwm2_olap_metadata_refresh.mr_refresh();
commit
/

CREATE TYPE CS_OLAP.CS_O_SHAW_SHAWPROM11OBJ AS OBJECT (SHAWPROMOTIONS_ET  VARCHAR2(100),
SHAWPROMOTIONS_PARENT  VARCHAR2(100),
SHAWPROMOTIONS_GID  NUMBER(12),
SHAWPROMOTIONS_PARENTGID  NUMBER(12),
R2C RAW(32),
CATEGORY_Category  VARCHAR2(100),
PROMOTION_Promotion  VARCHAR2(100),
SUBCATEGO_Subcategory  VARCHAR2(100),
TOTAL_Total  VARCHAR2(100),
AW_MEMBER_ORDER NUMBER,
LONG_DESCRIPTION VARCHAR2(1000),
SHORT_DESCRIPTION VARCHAR2(1000) )

/
CREATE TYPE CS_OLAP.CS_O_SHAW_SHAWPROM11TBL AS TABLE OF CS_OLAP.CS_O_SHAW_SHAWPROM11OBJ

/
GRANT EXECUTE ON CS_OLAP.CS_O_SHAW_SHAWPROM11OBJ TO PUBLIC
/
GRANT EXECUTE ON CS_OLAP.CS_O_SHAW_SHAWPROM11TBL TO PUBLIC
/
CREATE OR REPLACE VIEW CS_OLAP.CS_O_SHAW_SHAWP_PROMO11VIEW AS SELECT * FROM  TABLE(CAST(OLAP_TABLE('CS_OLAP.SHAW duration session',
 'CS_OLAP.CS_O_SHAW_SHAWPROM11TBL',
 ' ',
 '&(CS_OLAP.SHAW!olap_sys_limitmap(CS_OLAP.SHAW!olap_sys_viewdim ''CS_O_SHAW_SHAWP_PROMO11VIEW''))') AS CS_OLAP.CS_O_SHAW_SHAWPROM11TBL))

/
execute CWM2_OLAP_TABLE_MAP.ADD_AWVIEW('CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','R2C','CS_OLAP','SHAW');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWP_PROMO11VIEW', 'SHAWPROMOTIONS_ET', 'SHAWPROMOTIONS');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWP_PROMO11VIEW', 'SHAWPROMOTIONS_PARENT', 'SHAWPROMOTIONS_PARENTREL');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWP_PROMO11VIEW', 'CATEGORY_Category', 'SHAWPROMOTIONS_FAMILYREL');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWP_PROMO11VIEW', 'PROMOTION_Promotion', 'SHAWPROMOTIONS_FAMILYREL');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWP_PROMO11VIEW', 'SUBCATEGO_Subcategory', 'SHAWPROMOTIONS_FAMILYREL');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWP_PROMO11VIEW', 'TOTAL_Total', 'SHAWPROMOTIONS_FAMILYREL');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWP_PROMO11VIEW', 'SHAWPROMOTIONS_GID', 'SHAWPROMOTIONS_GID');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWP_PROMO11VIEW', 'SHAWPROMOTIONS_PARENTGID', 'SHAWPROMOTIONS_GID');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWP_PROMO11VIEW', 'AW_MEMBER_ORDER', 'SHAWPROMOTIONS_ORDER');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWP_PROMO11VIEW', 'LONG_DESCRIPTION', 'SHAWPROMOTIONS_LONG_DESCRIPTION');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWP_PROMO11VIEW', 'SHORT_DESCRIPTION', 'SHAWPROMOTIONS_SHORT_DESCRIPTION');
execute CWM2_OLAP_DIMENSION.CREATE_DIMENSION('CS_OLAP','SHAWPROMOTIONS','Promotion','Promotions','Promotion','Promotion',NULL);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWPROMOTIONS','DEFAULT_ORDER','DEFAULT_ORDER','DEFAULT_ORDER','DEFAULT_ORDER',0);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWPROMOTIONS','Long Description','Long_Description','Category','Category',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWPROMOTIONS','Short Description','Short_Description','Category','Category',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWPROMOTIONS','Grouping ID','Grouping ID','Grouping ID','Grouping ID',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWPROMOTIONS','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWPROMOTIONS','ET Key','ET Key','ET Key','ET Key',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWPROMOTIONS','Parent ET Key','Parent ET Key','Parent ET Key','Parent ET Key',1);
execute cwm2_olap_hierarchy.create_hierarchy('CS_OLAP','SHAWPROMOTIONS','PROMOTIONS','Standard','Standard','Standard','SOLVED LEVEL-BASED');
execute cwm2_olap_dimension.set_default_display_hierarchy('CS_OLAP','SHAWPROMOTIONS','PROMOTIONS');
execute cwm2_olap_level.create_level('CS_OLAP','SHAWPROMOTIONS','CATEGORY','Category','Category','Category','Category');
execute cwm2_olap_level.create_level('CS_OLAP','SHAWPROMOTIONS','PROMOTION','Promotion','Promotion','Promotion','Promotion');
execute cwm2_olap_level.create_level('CS_OLAP','SHAWPROMOTIONS','SUBCATEGORY','Subcategory','Subcategory','Subcategory','Subcategory');
execute cwm2_olap_level.create_level('CS_OLAP','SHAWPROMOTIONS','TOTAL','Total','Total','Total','Total');
execute cwm2_olap_level.add_level_to_hierarchy('CS_OLAP','SHAWPROMOTIONS','PROMOTIONS','TOTAL',NULL);
execute cwm2_olap_level.add_level_to_hierarchy('CS_OLAP','SHAWPROMOTIONS','PROMOTIONS','CATEGORY','TOTAL');
execute cwm2_olap_level.add_level_to_hierarchy('CS_OLAP','SHAWPROMOTIONS','PROMOTIONS','SUBCATEGORY','CATEGORY');
execute cwm2_olap_level.add_level_to_hierarchy('CS_OLAP','SHAWPROMOTIONS','PROMOTIONS','PROMOTION','SUBCATEGORY');
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','DEFAULT_ORDER','CATEGORY','DEFAULT_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER',0);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','DEFAULT_ORDER','PROMOTION','DEFAULT_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER',0);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','DEFAULT_ORDER','SUBCATEGORY','DEFAULT_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER',0);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','DEFAULT_ORDER','TOTAL','DEFAULT_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER',0);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','Long Description','CATEGORY','Long Description','Long_Description','Category','Category',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','Long Description','PROMOTION','Long Description','Long_Description','Category','Category',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','Long Description','SUBCATEGORY','Long Description','Long_Description','Category','Category',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','Long Description','TOTAL','Long Description','Long_Description','Category','Category',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','Short Description','CATEGORY','Short Description','Short_Description','Category','Category',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','Short Description','PROMOTION','Short Description','Short_Description','Category','Category',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','Short Description','SUBCATEGORY','Short Description','Short_Description','Category','Category',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','Short Description','TOTAL','Short Description','Short_Description','Category','Category',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','Grouping ID','CATEGORY','Grouping ID','Grouping ID','Grouping ID','Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','Parent Grouping ID','CATEGORY','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','ET Key','CATEGORY','ET Key','ET Key','ET Key','ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','Parent ET Key','CATEGORY','Parent ET Key','Parent ET Key','Parent ET Key','Parent ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','Grouping ID','PROMOTION','Grouping ID','Grouping ID','Grouping ID','Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','Parent Grouping ID','PROMOTION','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','ET Key','PROMOTION','ET Key','ET Key','ET Key','ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','Parent ET Key','PROMOTION','Parent ET Key','Parent ET Key','Parent ET Key','Parent ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','Grouping ID','SUBCATEGORY','Grouping ID','Grouping ID','Grouping ID','Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','Parent Grouping ID','SUBCATEGORY','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','ET Key','SUBCATEGORY','ET Key','ET Key','ET Key','ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','Parent ET Key','SUBCATEGORY','Parent ET Key','Parent ET Key','Parent ET Key','Parent ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','Grouping ID','TOTAL','Grouping ID','Grouping ID','Grouping ID','Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','Parent Grouping ID','TOTAL','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','ET Key','TOTAL','ET Key','ET Key','ET Key','ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWPROMOTIONS','Parent ET Key','TOTAL','Parent ET Key','Parent ET Key','Parent ET Key','Parent ET Key',1);
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVEL('CS_OLAP','SHAWPROMOTIONS','PROMOTIONS','TOTAL','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','TOTAL_Total',NULL);
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVEL('CS_OLAP','SHAWPROMOTIONS','PROMOTIONS','CATEGORY','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','CATEGORY_Category','TOTAL_Total');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVEL('CS_OLAP','SHAWPROMOTIONS','PROMOTIONS','SUBCATEGORY','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','SUBCATEGO_Subcategory','CATEGORY_Category');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVEL('CS_OLAP','SHAWPROMOTIONS','PROMOTIONS','PROMOTION','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','PROMOTION_Promotion','SUBCATEGO_Subcategory');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','DEFAULT_ORDER','PROMOTIONS','PROMOTION','DEFAULT_ORDER','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','AW_MEMBER_ORDER');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','DEFAULT_ORDER','PROMOTIONS','SUBCATEGORY','DEFAULT_ORDER','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','AW_MEMBER_ORDER');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','DEFAULT_ORDER','PROMOTIONS','CATEGORY','DEFAULT_ORDER','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','AW_MEMBER_ORDER');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','DEFAULT_ORDER','PROMOTIONS','TOTAL','DEFAULT_ORDER','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','AW_MEMBER_ORDER');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','Long Description','PROMOTIONS','PROMOTION','Long Description','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','LONG_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','Long Description','PROMOTIONS','SUBCATEGORY','Long Description','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','LONG_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','Long Description','PROMOTIONS','CATEGORY','Long Description','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','LONG_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','Long Description','PROMOTIONS','TOTAL','Long Description','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','LONG_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','Short Description','PROMOTIONS','PROMOTION','Short Description','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','SHORT_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','Short Description','PROMOTIONS','SUBCATEGORY','Short Description','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','SHORT_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','Short Description','PROMOTIONS','CATEGORY','Short Description','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','SHORT_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','Short Description','PROMOTIONS','TOTAL','Short Description','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','SHORT_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','Grouping ID','PROMOTIONS','PROMOTION','Grouping ID','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','SHAWPROMOTIONS_GID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','Parent Grouping ID','PROMOTIONS','PROMOTION','Parent Grouping ID','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','SHAWPROMOTIONS_PARENTGID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','ET Key','PROMOTIONS','PROMOTION','ET Key','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','SHAWPROMOTIONS_ET');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','Parent ET Key','PROMOTIONS','PROMOTION','Parent ET Key','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','SHAWPROMOTIONS_PARENT');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','Grouping ID','PROMOTIONS','SUBCATEGORY','Grouping ID','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','SHAWPROMOTIONS_GID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','Parent Grouping ID','PROMOTIONS','SUBCATEGORY','Parent Grouping ID','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','SHAWPROMOTIONS_PARENTGID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','ET Key','PROMOTIONS','SUBCATEGORY','ET Key','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','SHAWPROMOTIONS_ET');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','Parent ET Key','PROMOTIONS','SUBCATEGORY','Parent ET Key','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','SHAWPROMOTIONS_PARENT');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','Grouping ID','PROMOTIONS','CATEGORY','Grouping ID','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','SHAWPROMOTIONS_GID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','Parent Grouping ID','PROMOTIONS','CATEGORY','Parent Grouping ID','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','SHAWPROMOTIONS_PARENTGID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','ET Key','PROMOTIONS','CATEGORY','ET Key','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','SHAWPROMOTIONS_ET');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','Parent ET Key','PROMOTIONS','CATEGORY','Parent ET Key','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','SHAWPROMOTIONS_PARENT');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','Grouping ID','PROMOTIONS','TOTAL','Grouping ID','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','SHAWPROMOTIONS_GID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','Parent Grouping ID','PROMOTIONS','TOTAL','Parent Grouping ID','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','SHAWPROMOTIONS_PARENTGID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','ET Key','PROMOTIONS','TOTAL','ET Key','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','SHAWPROMOTIONS_ET');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWPROMOTIONS','Parent ET Key','PROMOTIONS','TOTAL','Parent ET Key','CS_OLAP','CS_O_SHAW_SHAWP_PROMO11VIEW','SHAWPROMOTIONS_PARENT');
execute cwm2_olap_validate.validate_dimension('CS_OLAP', 'SHAWPROMOTIONS', 'OLAP API', 'NO');
execute cwm2_olap_metadata_refresh.mr_refresh();
commit
/

CREATE TYPE CS_OLAP.CS_O_SHAW_SHAWT_TI12OBJ AS OBJECT (SHAWT_TIME_ET  VARCHAR2(100),
SHAWT_TIME_PARENT  VARCHAR2(100),
SHAWT_TIME_GID  NUMBER(12),
SHAWT_TIME_PARENTGID  NUMBER(12),
R2C RAW(32),
CAL_YEAR_Calendar_Year  VARCHAR2(100),
CAL_QUART_Calendar_Quarte  VARCHAR2(100),
MONTH_Month  VARCHAR2(100),
AW_MEMBER_ORDER NUMBER,
LONG_DESCRIPTION VARCHAR2(1000),
SHORT_DESCRIPTION VARCHAR2(1000),
END_DATE DATE,
TIME_SPAN NUMBER )

/
CREATE TYPE CS_OLAP.CS_O_SHAW_SHAWT_TI12TBL AS TABLE OF CS_OLAP.CS_O_SHAW_SHAWT_TI12OBJ

/
GRANT EXECUTE ON CS_OLAP.CS_O_SHAW_SHAWT_TI12OBJ TO PUBLIC
/
GRANT EXECUTE ON CS_OLAP.CS_O_SHAW_SHAWT_TI12TBL TO PUBLIC
/
CREATE OR REPLACE VIEW CS_OLAP.CS_O_SHAW_SHAWT_CALEN12VIEW AS SELECT * FROM  TABLE(CAST(OLAP_TABLE('CS_OLAP.SHAW duration session',
 'CS_OLAP.CS_O_SHAW_SHAWT_TI12TBL',
 ' ',
 '&(CS_OLAP.SHAW!olap_sys_limitmap(CS_OLAP.SHAW!olap_sys_viewdim ''CS_O_SHAW_SHAWT_CALEN12VIEW''))') AS CS_OLAP.CS_O_SHAW_SHAWT_TI12TBL))

/
execute CWM2_OLAP_TABLE_MAP.ADD_AWVIEW('CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','R2C','CS_OLAP','SHAW');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWT_CALEN12VIEW', 'SHAWT_TIME_ET', 'SHAWT_TIME');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWT_CALEN12VIEW', 'SHAWT_TIME_PARENT', 'SHAWT_TIME_PARENTREL');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWT_CALEN12VIEW', 'CAL_YEAR_Calendar_Year', 'SHAWT_TIME_FAMILYREL');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWT_CALEN12VIEW', 'CAL_QUART_Calendar_Quarte', 'SHAWT_TIME_FAMILYREL');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWT_CALEN12VIEW', 'MONTH_Month', 'SHAWT_TIME_FAMILYREL');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWT_CALEN12VIEW', 'SHAWT_TIME_GID', 'SHAWT_TIME_GID');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWT_CALEN12VIEW', 'SHAWT_TIME_PARENTGID', 'SHAWT_TIME_GID');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWT_CALEN12VIEW', 'AW_MEMBER_ORDER', 'SHAWT_TIME_ORDER');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWT_CALEN12VIEW', 'LONG_DESCRIPTION', 'SHAWT_TIME_LONG_DESCRIPTION');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWT_CALEN12VIEW', 'SHORT_DESCRIPTION', 'SHAWT_TIME_SHORT_DESCRIPTION');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWT_CALEN12VIEW', 'END_DATE', 'SHAWT_TIME_END_DATE');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWT_CALEN12VIEW', 'TIME_SPAN', 'SHAWT_TIME_TIME_SPAN');
execute CWM2_OLAP_DIMENSION.CREATE_DIMENSION('CS_OLAP','SHAWT_TIME','Time','Times','Time','Time','Time');
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWT_TIME','DEFAULT_ORDER','DEFAULT_ORDER','DEFAULT_ORDER','DEFAULT_ORDER',0);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWT_TIME','Long Description','Long_Description','Calendar Year','Calendar Year',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWT_TIME','Short Description','Short_Description','Calendar Year','Calendar Year',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWT_TIME','End Date','End_Date','Calendar Year end date','Calendar Year end date',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWT_TIME','Time Span','Time_Span','Calendar Year timespan','Calendar Year timespan',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWT_TIME','Grouping ID','Grouping ID','Grouping ID','Grouping ID',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWT_TIME','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWT_TIME','ET Key','ET Key','ET Key','ET Key',1);
execute cwm2_olap_dimension_attribute.create_dimension_attribute_2('CS_OLAP','SHAWT_TIME','Parent ET Key','Parent ET Key','Parent ET Key','Parent ET Key',1);
execute cwm2_olap_hierarchy.create_hierarchy('CS_OLAP','SHAWT_TIME','CALENDAR','Calendar','Calendar','Calendar','SOLVED LEVEL-BASED');
execute cwm2_olap_dimension.set_default_display_hierarchy('CS_OLAP','SHAWT_TIME','CALENDAR');
execute cwm2_olap_level.create_level('CS_OLAP','SHAWT_TIME','CAL_YEAR','Calendar Year','Calendar Year','Calendar Year','Calendar Year');
execute cwm2_olap_level.create_level('CS_OLAP','SHAWT_TIME','CAL_QUARTER','Calendar Quarter','Calendar Quarter','Calendar Quarter','Calendar Quarter');
execute cwm2_olap_level.create_level('CS_OLAP','SHAWT_TIME','MONTH','Month','Month','Month','Month');
execute cwm2_olap_level.add_level_to_hierarchy('CS_OLAP','SHAWT_TIME','CALENDAR','CAL_YEAR',NULL);
execute cwm2_olap_level.add_level_to_hierarchy('CS_OLAP','SHAWT_TIME','CALENDAR','CAL_QUARTER','CAL_YEAR');
execute cwm2_olap_level.add_level_to_hierarchy('CS_OLAP','SHAWT_TIME','CALENDAR','MONTH','CAL_QUARTER');
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','DEFAULT_ORDER','CAL_YEAR','DEFAULT_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER',0);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','DEFAULT_ORDER','CAL_QUARTER','DEFAULT_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER',0);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','DEFAULT_ORDER','MONTH','DEFAULT_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER','AW_MEMBER_ORDER',0);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','Long Description','CAL_YEAR','Long Description','Long_Description','Calendar Year','Calendar Year',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','Long Description','CAL_QUARTER','Long Description','Long_Description','Calendar Year','Calendar Year',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','Long Description','MONTH','Long Description','Long_Description','Calendar Year','Calendar Year',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','Short Description','CAL_YEAR','Short Description','Short_Description','Calendar Year','Calendar Year',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','Short Description','CAL_QUARTER','Short Description','Short_Description','Calendar Year','Calendar Year',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','Short Description','MONTH','Short Description','Short_Description','Calendar Year','Calendar Year',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','End Date','CAL_YEAR','End Date','End_Date','Calendar Year end date','Calendar Year end date',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','End Date','CAL_QUARTER','End Date','End_Date','Calendar Year end date','Calendar Year end date',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','End Date','MONTH','End Date','End_Date','Calendar Year end date','Calendar Year end date',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','Time Span','CAL_YEAR','Time Span','Time_Span','Calendar Year timespan','Calendar Year timespan',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','Time Span','CAL_QUARTER','Time Span','Time_Span','Calendar Year timespan','Calendar Year timespan',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','Time Span','MONTH','Time Span','Time_Span','Calendar Year timespan','Calendar Year timespan',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','Grouping ID','CAL_YEAR','Grouping ID','Grouping ID','Grouping ID','Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','Parent Grouping ID','CAL_YEAR','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','ET Key','CAL_YEAR','ET Key','ET Key','ET Key','ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','Parent ET Key','CAL_YEAR','Parent ET Key','Parent ET Key','Parent ET Key','Parent ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','Grouping ID','CAL_QUARTER','Grouping ID','Grouping ID','Grouping ID','Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','Parent Grouping ID','CAL_QUARTER','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','ET Key','CAL_QUARTER','ET Key','ET Key','ET Key','ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','Parent ET Key','CAL_QUARTER','Parent ET Key','Parent ET Key','Parent ET Key','Parent ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','Grouping ID','MONTH','Grouping ID','Grouping ID','Grouping ID','Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','Parent Grouping ID','MONTH','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID','Parent Grouping ID',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','ET Key','MONTH','ET Key','ET Key','ET Key','ET Key',1);
execute cwm2_olap_level_attribute.create_level_attribute_2('CS_OLAP','SHAWT_TIME','Parent ET Key','MONTH','Parent ET Key','Parent ET Key','Parent ET Key','Parent ET Key',1);
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVEL('CS_OLAP','SHAWT_TIME','CALENDAR','CAL_YEAR','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','CAL_YEAR_Calendar_Year',NULL);
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVEL('CS_OLAP','SHAWT_TIME','CALENDAR','CAL_QUARTER','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','CAL_QUART_Calendar_Quarte','CAL_YEAR_Calendar_Year');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVEL('CS_OLAP','SHAWT_TIME','CALENDAR','MONTH','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','MONTH_Month','CAL_QUART_Calendar_Quarte');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','DEFAULT_ORDER','CALENDAR','MONTH','DEFAULT_ORDER','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','AW_MEMBER_ORDER');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','DEFAULT_ORDER','CALENDAR','CAL_QUARTER','DEFAULT_ORDER','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','AW_MEMBER_ORDER');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','DEFAULT_ORDER','CALENDAR','CAL_YEAR','DEFAULT_ORDER','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','AW_MEMBER_ORDER');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','Long Description','CALENDAR','MONTH','Long Description','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','LONG_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','Long Description','CALENDAR','CAL_QUARTER','Long Description','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','LONG_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','Long Description','CALENDAR','CAL_YEAR','Long Description','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','LONG_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','Short Description','CALENDAR','MONTH','Short Description','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','SHORT_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','Short Description','CALENDAR','CAL_QUARTER','Short Description','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','SHORT_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','Short Description','CALENDAR','CAL_YEAR','Short Description','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','SHORT_DESCRIPTION');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','End Date','CALENDAR','MONTH','End Date','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','END_DATE');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','End Date','CALENDAR','CAL_QUARTER','End Date','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','END_DATE');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','End Date','CALENDAR','CAL_YEAR','End Date','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','END_DATE');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','Time Span','CALENDAR','MONTH','Time Span','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','TIME_SPAN');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','Time Span','CALENDAR','CAL_QUARTER','Time Span','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','TIME_SPAN');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','Time Span','CALENDAR','CAL_YEAR','Time Span','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','TIME_SPAN');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','Grouping ID','CALENDAR','MONTH','Grouping ID','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','SHAWT_TIME_GID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','Parent Grouping ID','CALENDAR','MONTH','Parent Grouping ID','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','SHAWT_TIME_PARENTGID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','ET Key','CALENDAR','MONTH','ET Key','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','SHAWT_TIME_ET');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','Parent ET Key','CALENDAR','MONTH','Parent ET Key','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','SHAWT_TIME_PARENT');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','Grouping ID','CALENDAR','CAL_QUARTER','Grouping ID','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','SHAWT_TIME_GID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','Parent Grouping ID','CALENDAR','CAL_QUARTER','Parent Grouping ID','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','SHAWT_TIME_PARENTGID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','ET Key','CALENDAR','CAL_QUARTER','ET Key','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','SHAWT_TIME_ET');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','Parent ET Key','CALENDAR','CAL_QUARTER','Parent ET Key','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','SHAWT_TIME_PARENT');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','Grouping ID','CALENDAR','CAL_YEAR','Grouping ID','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','SHAWT_TIME_GID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','Parent Grouping ID','CALENDAR','CAL_YEAR','Parent Grouping ID','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','SHAWT_TIME_PARENTGID');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','ET Key','CALENDAR','CAL_YEAR','ET Key','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','SHAWT_TIME_ET');
execute CWM2_OLAP_TABLE_MAP.MAP_DIMTBL_HIERLEVELATTR('CS_OLAP','SHAWT_TIME','Parent ET Key','CALENDAR','CAL_YEAR','Parent ET Key','CS_OLAP','CS_O_SHAW_SHAWT_CALEN12VIEW','SHAWT_TIME_PARENT');
execute cwm2_olap_validate.validate_dimension('CS_OLAP', 'SHAWT_TIME', 'OLAP API', 'NO');
execute cwm2_olap_metadata_refresh.mr_refresh();
commit
/

CREATE TYPE CS_OLAP.CS_O_SHAW_SHAWSALE13OBJ AS OBJECT (SHAWCHANNELS_ET VARCHAR2(100),
SHAWCHANNELS_GID NUMBER(12),
SHAWGEOGRAPHIES_ET VARCHAR2(100),
SHAWGEOGRAPHIES_GID NUMBER(12),
SHAWPRODUCTS_ET VARCHAR2(100),
SHAWPRODUCTS_GID NUMBER(12),
SHAWPROMOTIONS_ET VARCHAR2(100),
SHAWPROMOTIONS_GID NUMBER(12),
SHAWT_TIME_ET VARCHAR2(100),
SHAWT_TIME_GID NUMBER(12),
AMOUNT_SOLD NUMBER,
AMOUNT_SOLD_12MMA NUMBER,
AMOUNT_SOLD_6MMA NUMBER,
AMOUNT_SOLD_FCAST_BF NUMBER,
AMOUNT_SOLD_FCAST_EXPO NUMBER,
AMOUNT_SOLD_FCAST_LINEAR NUMBER,
AMOUNT_SOLD_FCAST_NLINEAR NUMBER,
AMOUNT_SOLD_FCAST_SEASONAL NUMBER,
AMOUNT_SOLD_FCAST_TREND NUMBER,
AMOUNT_SOLD_PCT_CHANGE_PP NUMBER,
AMOUNT_SOLD_PCT_CHANGE_YRA NUMBER,
COSTS NUMBER,
COSTS_12MMA NUMBER,
COSTS_6MMA NUMBER,
COSTS_FCAST_BF NUMBER,
COSTS_PCT_CHANGE_PP NUMBER,
COSTS_PCT_CHANGE_YRAGO NUMBER,
MARGIN_12MMA NUMBER,
MARGIN_6MMA NUMBER,
MARGIN_FCAST_BF NUMBER,
MARGIN_PCT_CHANGE_PP NUMBER,
MARGIN_PCT_CHANGE_YRAGO NUMBER,
MARGIN_PERCENT NUMBER,
QUANTITY_SOLD NUMBER,
R2C RAW(32) )

/
CREATE TYPE CS_OLAP.CS_O_SHAW_SHAWSALE13TBL AS TABLE OF CS_OLAP.CS_O_SHAW_SHAWSALE13OBJ

/
GRANT EXECUTE ON CS_OLAP.CS_O_SHAW_SHAWSALE13OBJ TO PUBLIC
/
GRANT EXECUTE ON CS_OLAP.CS_O_SHAW_SHAWSALE13TBL TO PUBLIC
/
CREATE OR REPLACE VIEW CS_OLAP.CS_O_SHAW_SHAWSALE14VIEW AS SELECT *  FROM TABLE(CAST(OLAP_TABLE('CS_OLAP.SHAW duration session',
 'CS_OLAP.CS_O_SHAW_SHAWSALE13TBL',
'',
'&(CS_OLAP.SHAW!olap_sys_limitmap(CS_OLAP.SHAW!olap_sys_viewdim ''CS_O_SHAW_SHAWSALE14VIEW''))') AS CS_OLAP.CS_O_SHAW_SHAWSALE13TBL))

/
execute CWM2_OLAP_TABLE_MAP.ADD_AWVIEW('CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','R2C','CS_OLAP','SHAW');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWSALE14VIEW', 'AMOUNT_SOLD', 'SHAWSALES_AMOUNT_SOLD');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWSALE14VIEW', 'AMOUNT_SOLD_12MMA', 'SHAWSALES_AMOUNT_SOLD_12MMA');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWSALE14VIEW', 'AMOUNT_SOLD_6MMA', 'SHAWSALES_AMOUNT_SOLD_6MMA');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWSALE14VIEW', 'AMOUNT_SOLD_FCAST_BF', 'SHAWSALES_AMOUNT_SOLD_FCAST_BF');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWSALE14VIEW', 'AMOUNT_SOLD_FCAST_EXPO', 'SHAWSALES_AMOUNT_SOLD_FCAST_EXPO');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWSALE14VIEW', 'AMOUNT_SOLD_FCAST_LINEAR', 'SHAWSALES_AMOUNT_SOLD_FCAST_LINEAR');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWSALE14VIEW', 'AMOUNT_SOLD_FCAST_NLINEAR', 'SHAWSALES_AMOUNT_SOLD_FCAST_NLINEAR');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWSALE14VIEW', 'AMOUNT_SOLD_FCAST_SEASONAL', 'SHAWSALES_AMOUNT_SOLD_FCAST_SEASONAL');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWSALE14VIEW', 'AMOUNT_SOLD_FCAST_TREND', 'SHAWSALES_AMOUNT_SOLD_FCAST_TREND');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWSALE14VIEW', 'AMOUNT_SOLD_PCT_CHANGE_PP', 'SHAWSALES_AMOUNT_SOLD_PCT_CHANGE_PP');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWSALE14VIEW', 'AMOUNT_SOLD_PCT_CHANGE_YRA', 'SHAWSALES_AMOUNT_SOLD_PCT_CHANGE_YRAGO');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWSALE14VIEW', 'COSTS', 'SHAWSALES_COSTS');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWSALE14VIEW', 'COSTS_12MMA', 'SHAWSALES_COSTS_12MMA');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWSALE14VIEW', 'COSTS_6MMA', 'SHAWSALES_COSTS_6MMA');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWSALE14VIEW', 'COSTS_FCAST_BF', 'SHAWSALES_COSTS_FCAST_BF');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWSALE14VIEW', 'COSTS_PCT_CHANGE_PP', 'SHAWSALES_COSTS_PCT_CHANGE_PP');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWSALE14VIEW', 'COSTS_PCT_CHANGE_YRAGO', 'SHAWSALES_COSTS_PCT_CHANGE_YRAGO');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWSALE14VIEW', 'MARGIN_12MMA', 'SHAWSALES_MARGIN_12MMA');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWSALE14VIEW', 'MARGIN_6MMA', 'SHAWSALES_MARGIN_6MMA');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWSALE14VIEW', 'MARGIN_FCAST_BF', 'SHAWSALES_MARGIN_FCAST_BF');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWSALE14VIEW', 'MARGIN_PCT_CHANGE_PP', 'SHAWSALES_MARGIN_PCT_CHANGE_PP');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWSALE14VIEW', 'MARGIN_PCT_CHANGE_YRAGO', 'SHAWSALES_MARGIN_PCT_CHANGE_YRAGO');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWSALE14VIEW', 'MARGIN_PERCENT', 'SHAWSALES_MARGIN_PERCENT');
execute cwm2_olap_table_map.map_awview_column('CS_OLAP', 'CS_O_SHAW_SHAWSALE14VIEW', 'QUANTITY_SOLD', 'SHAWSALES_QUANTITY_SOLD');
execute CWM2_OLAP_CUBE.CREATE_CUBE('CS_OLAP','SHAWSALES','SHAWSALES','SHAWSALES','SHAWSALES');
execute CWM2_OLAP_CUBE.ADD_DIMENSION_TO_CUBE('CS_OLAP','SHAWSALES','CS_OLAP','SHAWCHANNELS');
execute CWM2_OLAP_CUBE.ADD_DIMENSION_TO_CUBE('CS_OLAP','SHAWSALES','CS_OLAP','SHAWGEOGRAPHIES');
execute CWM2_OLAP_CUBE.ADD_DIMENSION_TO_CUBE('CS_OLAP','SHAWSALES','CS_OLAP','SHAWPRODUCTS');
execute CWM2_OLAP_CUBE.ADD_DIMENSION_TO_CUBE('CS_OLAP','SHAWSALES','CS_OLAP','SHAWPROMOTIONS');
execute CWM2_OLAP_CUBE.ADD_DIMENSION_TO_CUBE('CS_OLAP','SHAWSALES','CS_OLAP','SHAWT_TIME');
execute CWM2_OLAP_MEASURE.CREATE_MEASURE('CS_OLAP','SHAWSALES','AMOUNT_SOLD','Revenue','Sales Revenue','Sales Revenue');
execute CWM2_OLAP_MEASURE.CREATE_MEASURE('CS_OLAP','SHAWSALES','AMOUNT_SOLD_12MMA','Revenue 12 Mo MV Avg','Sales Revenue 12 Month Moving Average','Sales Revenue 12 Month Moving Average');
execute CWM2_OLAP_MEASURE.CREATE_MEASURE('CS_OLAP','SHAWSALES','AMOUNT_SOLD_6MMA','Revenue 6 Mo MV Avg','Sales Revenue 6 Month Moving Average','Sales Revenue 6 Month Moving Average');
execute CWM2_OLAP_MEASURE.CREATE_MEASURE('CS_OLAP','SHAWSALES','AMOUNT_SOLD_FCAST_BF','Revenue Fcst Best Fit','Sales Revenue Forecast Best Fit','Sales Revenue Forecast Best Fit');
execute CWM2_OLAP_MEASURE.CREATE_MEASURE('CS_OLAP','SHAWSALES','AMOUNT_SOLD_FCAST_EXPO','Revenue Fcst Exponential','Sales Revenue Forecast Exponential','Sales Revenue Forecast Exponential');
execute CWM2_OLAP_MEASURE.CREATE_MEASURE('CS_OLAP','SHAWSALES','AMOUNT_SOLD_FCAST_LINEAR','Revenue Fcst Linear','Sales Revenue Forecast Linear','Sales Revenue Forecast Linear');
execute CWM2_OLAP_MEASURE.CREATE_MEASURE('CS_OLAP','SHAWSALES','AMOUNT_SOLD_FCAST_NLINEAR','Revenue Fcst Non-Linear','Sales Revenue Forecast Non-Linear','Sales Revenue Forecast Non-Linear');
execute CWM2_OLAP_MEASURE.CREATE_MEASURE('CS_OLAP','SHAWSALES','AMOUNT_SOLD_FCAST_SEASONAL','Revenue Fcst Seasonal','Sales Revenue Forecast Seasonal','Sales Revenue Forecast Seasonal');
execute CWM2_OLAP_MEASURE.CREATE_MEASURE('CS_OLAP','SHAWSALES','AMOUNT_SOLD_FCAST_TREND','Revenue Fcst Trend','Sales Revenue Forecast Trend','Sales Revenue Forecast Trend');
execute CWM2_OLAP_MEASURE.CREATE_MEASURE('CS_OLAP','SHAWSALES','AMOUNT_SOLD_PCT_CHANGE_PP','Revenue % Growth Prior Period','Sales Revenue Percent Change Prior Period','Sales Revenue Percent Change Prior Period');
execute CWM2_OLAP_MEASURE.CREATE_MEASURE('CS_OLAP','SHAWSALES','AMOUNT_SOLD_PCT_CHANGE_YRAGO','Revenue % Growth','Sales Revenue Percent Change Year Ago','Sales Revenue Percent Change Year Ago');
execute CWM2_OLAP_MEASURE.CREATE_MEASURE('CS_OLAP','SHAWSALES','COSTS','Cost','Sales Cost','Sales Cost');
execute CWM2_OLAP_MEASURE.CREATE_MEASURE('CS_OLAP','SHAWSALES','COSTS_12MMA','Cost 12 Mo MV Avg','Costs 12 Month Moving Average','Costs 12 Month Moving Average');
execute CWM2_OLAP_MEASURE.CREATE_MEASURE('CS_OLAP','SHAWSALES','COSTS_6MMA','Cost 6 Mo MV Avg','Costs 6 Month Moving Average','Costs 6 Month Moving Average');
execute CWM2_OLAP_MEASURE.CREATE_MEASURE('CS_OLAP','SHAWSALES','COSTS_FCAST_BF','Cost Fcst Best Fit','Costs Forecast Best Fit','Costs Forecast Best Fit');
execute CWM2_OLAP_MEASURE.CREATE_MEASURE('CS_OLAP','SHAWSALES','COSTS_PCT_CHANGE_PP','Cost % Growth Prior Period','Costs Percent Change Prior Period','Costs Percent Change Prior Period');
execute CWM2_OLAP_MEASURE.CREATE_MEASURE('CS_OLAP','SHAWSALES','COSTS_PCT_CHANGE_YRAGO','Cost % Growth','Costs Percent Change Year Ago','Costs Percent Change Year Ago');
execute CWM2_OLAP_MEASURE.CREATE_MEASURE('CS_OLAP','SHAWSALES','MARGIN_12MMA','Margin 12 Mo MV Avg','Margin 12 Month Moving Average','Margin 12 Month Moving Average');
execute CWM2_OLAP_MEASURE.CREATE_MEASURE('CS_OLAP','SHAWSALES','MARGIN_6MMA','Margin 6 Mo MV Avg','Margin 6 Month Moving Average','Margin 6 Month Moving Average');
execute CWM2_OLAP_MEASURE.CREATE_MEASURE('CS_OLAP','SHAWSALES','MARGIN_FCAST_BF','Margin Fcst Best Fit','Margin Forecast Best Fit','Margin Forecast Best Fit');
execute CWM2_OLAP_MEASURE.CREATE_MEASURE('CS_OLAP','SHAWSALES','MARGIN_PCT_CHANGE_PP','Margin % Growth Prior Period','Margin % Change Prior Period','Margin % Change Prior Period');
execute CWM2_OLAP_MEASURE.CREATE_MEASURE('CS_OLAP','SHAWSALES','MARGIN_PCT_CHANGE_YRAGO','Margin % Growth','Margin % Change Year Ago','Margin % Change Year Ago');
execute CWM2_OLAP_MEASURE.CREATE_MEASURE('CS_OLAP','SHAWSALES','MARGIN_PERCENT','Margin %','Margin %','Margin %');
execute CWM2_OLAP_MEASURE.CREATE_MEASURE('CS_OLAP','SHAWSALES','QUANTITY_SOLD','Quantity','Quantity','Quantity');
execute CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_LEVELKEY('CS_OLAP','SHAWSALES','CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','ET','DIM:CS_OLAP.SHAWCHANNELS/HIER:CHANNELS/GID:SHAWCHANNELS_GID/LVL:CHANNEL/COL:SHAWCHANNELS_ET;DIM:CS_OLAP.SHAWGEOGRAPHIES/HIER:STANDARD/GID:SHAWGEOGRAPHIES_GID/LVL:COUNTRY/COL:SHAWGEOGRAPHIES_ET;DIM:CS_OLAP.SHAWPRODUCTS/HIER:PRODUCTS/GID:SHAWPRODUCTS_GID/LVL:PRODUCT/COL:SHAWPRODUCTS_ET;DIM:CS_OLAP.SHAWPROMOTIONS/HIER:PROMOTIONS/GID:SHAWPROMOTIONS_GID/LVL:PROMOTION/COL:SHAWPROMOTIONS_ET;DIM:CS_OLAP.SHAWT_TIME/HIER:CALENDAR/GID:SHAWT_TIME_GID/LVL:MONTH/COL:SHAWT_TIME_ET;');
execute CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE('CS_OLAP','SHAWSALES','AMOUNT_SOLD','CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','AMOUNT_SOLD','DIM:CS_OLAP.SHAWCHANNELS/HIER:CHANNELS/LVL:CHANNEL/COL:SHAWCHANNELS_ET;DIM:CS_OLAP.SHAWGEOGRAPHIES/HIER:STANDARD/LVL:COUNTRY/COL:SHAWGEOGRAPHIES_ET;DIM:CS_OLAP.SHAWPRODUCTS/HIER:PRODUCTS/LVL:PRODUCT/COL:SHAWPRODUCTS_ET;DIM:CS_OLAP.SHAWPROMOTIONS/HIER:PROMOTIONS/LVL:PROMOTION/COL:SHAWPROMOTIONS_ET;DIM:CS_OLAP.SHAWT_TIME/HIER:CALENDAR/LVL:MONTH/COL:SHAWT_TIME_ET;');
execute CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE('CS_OLAP','SHAWSALES','AMOUNT_SOLD_12MMA','CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','AMOUNT_SOLD_12MMA','DIM:CS_OLAP.SHAWCHANNELS/HIER:CHANNELS/LVL:CHANNEL/COL:SHAWCHANNELS_ET;DIM:CS_OLAP.SHAWGEOGRAPHIES/HIER:STANDARD/LVL:COUNTRY/COL:SHAWGEOGRAPHIES_ET;DIM:CS_OLAP.SHAWPRODUCTS/HIER:PRODUCTS/LVL:PRODUCT/COL:SHAWPRODUCTS_ET;DIM:CS_OLAP.SHAWPROMOTIONS/HIER:PROMOTIONS/LVL:PROMOTION/COL:SHAWPROMOTIONS_ET;DIM:CS_OLAP.SHAWT_TIME/HIER:CALENDAR/LVL:MONTH/COL:SHAWT_TIME_ET;');
execute CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE('CS_OLAP','SHAWSALES','AMOUNT_SOLD_6MMA','CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','AMOUNT_SOLD_6MMA','DIM:CS_OLAP.SHAWCHANNELS/HIER:CHANNELS/LVL:CHANNEL/COL:SHAWCHANNELS_ET;DIM:CS_OLAP.SHAWGEOGRAPHIES/HIER:STANDARD/LVL:COUNTRY/COL:SHAWGEOGRAPHIES_ET;DIM:CS_OLAP.SHAWPRODUCTS/HIER:PRODUCTS/LVL:PRODUCT/COL:SHAWPRODUCTS_ET;DIM:CS_OLAP.SHAWPROMOTIONS/HIER:PROMOTIONS/LVL:PROMOTION/COL:SHAWPROMOTIONS_ET;DIM:CS_OLAP.SHAWT_TIME/HIER:CALENDAR/LVL:MONTH/COL:SHAWT_TIME_ET;');
execute CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE('CS_OLAP','SHAWSALES','AMOUNT_SOLD_FCAST_BF','CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','AMOUNT_SOLD_FCAST_BF','DIM:CS_OLAP.SHAWCHANNELS/HIER:CHANNELS/LVL:CHANNEL/COL:SHAWCHANNELS_ET;DIM:CS_OLAP.SHAWGEOGRAPHIES/HIER:STANDARD/LVL:COUNTRY/COL:SHAWGEOGRAPHIES_ET;DIM:CS_OLAP.SHAWPRODUCTS/HIER:PRODUCTS/LVL:PRODUCT/COL:SHAWPRODUCTS_ET;DIM:CS_OLAP.SHAWPROMOTIONS/HIER:PROMOTIONS/LVL:PROMOTION/COL:SHAWPROMOTIONS_ET;DIM:CS_OLAP.SHAWT_TIME/HIER:CALENDAR/LVL:MONTH/COL:SHAWT_TIME_ET;');
execute CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE('CS_OLAP','SHAWSALES','AMOUNT_SOLD_FCAST_EXPO','CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','AMOUNT_SOLD_FCAST_EXPO','DIM:CS_OLAP.SHAWCHANNELS/HIER:CHANNELS/LVL:CHANNEL/COL:SHAWCHANNELS_ET;DIM:CS_OLAP.SHAWGEOGRAPHIES/HIER:STANDARD/LVL:COUNTRY/COL:SHAWGEOGRAPHIES_ET;DIM:CS_OLAP.SHAWPRODUCTS/HIER:PRODUCTS/LVL:PRODUCT/COL:SHAWPRODUCTS_ET;DIM:CS_OLAP.SHAWPROMOTIONS/HIER:PROMOTIONS/LVL:PROMOTION/COL:SHAWPROMOTIONS_ET;DIM:CS_OLAP.SHAWT_TIME/HIER:CALENDAR/LVL:MONTH/COL:SHAWT_TIME_ET;');
execute CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE('CS_OLAP','SHAWSALES','AMOUNT_SOLD_FCAST_LINEAR','CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','AMOUNT_SOLD_FCAST_LINEAR','DIM:CS_OLAP.SHAWCHANNELS/HIER:CHANNELS/LVL:CHANNEL/COL:SHAWCHANNELS_ET;DIM:CS_OLAP.SHAWGEOGRAPHIES/HIER:STANDARD/LVL:COUNTRY/COL:SHAWGEOGRAPHIES_ET;DIM:CS_OLAP.SHAWPRODUCTS/HIER:PRODUCTS/LVL:PRODUCT/COL:SHAWPRODUCTS_ET;DIM:CS_OLAP.SHAWPROMOTIONS/HIER:PROMOTIONS/LVL:PROMOTION/COL:SHAWPROMOTIONS_ET;DIM:CS_OLAP.SHAWT_TIME/HIER:CALENDAR/LVL:MONTH/COL:SHAWT_TIME_ET;');
execute CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE('CS_OLAP','SHAWSALES','AMOUNT_SOLD_FCAST_NLINEAR','CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','AMOUNT_SOLD_FCAST_NLINEAR','DIM:CS_OLAP.SHAWCHANNELS/HIER:CHANNELS/LVL:CHANNEL/COL:SHAWCHANNELS_ET;DIM:CS_OLAP.SHAWGEOGRAPHIES/HIER:STANDARD/LVL:COUNTRY/COL:SHAWGEOGRAPHIES_ET;DIM:CS_OLAP.SHAWPRODUCTS/HIER:PRODUCTS/LVL:PRODUCT/COL:SHAWPRODUCTS_ET;DIM:CS_OLAP.SHAWPROMOTIONS/HIER:PROMOTIONS/LVL:PROMOTION/COL:SHAWPROMOTIONS_ET;DIM:CS_OLAP.SHAWT_TIME/HIER:CALENDAR/LVL:MONTH/COL:SHAWT_TIME_ET;');
execute CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE('CS_OLAP','SHAWSALES','AMOUNT_SOLD_FCAST_SEASONAL','CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','AMOUNT_SOLD_FCAST_SEASONAL','DIM:CS_OLAP.SHAWCHANNELS/HIER:CHANNELS/LVL:CHANNEL/COL:SHAWCHANNELS_ET;DIM:CS_OLAP.SHAWGEOGRAPHIES/HIER:STANDARD/LVL:COUNTRY/COL:SHAWGEOGRAPHIES_ET;DIM:CS_OLAP.SHAWPRODUCTS/HIER:PRODUCTS/LVL:PRODUCT/COL:SHAWPRODUCTS_ET;DIM:CS_OLAP.SHAWPROMOTIONS/HIER:PROMOTIONS/LVL:PROMOTION/COL:SHAWPROMOTIONS_ET;DIM:CS_OLAP.SHAWT_TIME/HIER:CALENDAR/LVL:MONTH/COL:SHAWT_TIME_ET;');
execute CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE('CS_OLAP','SHAWSALES','AMOUNT_SOLD_FCAST_TREND','CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','AMOUNT_SOLD_FCAST_TREND','DIM:CS_OLAP.SHAWCHANNELS/HIER:CHANNELS/LVL:CHANNEL/COL:SHAWCHANNELS_ET;DIM:CS_OLAP.SHAWGEOGRAPHIES/HIER:STANDARD/LVL:COUNTRY/COL:SHAWGEOGRAPHIES_ET;DIM:CS_OLAP.SHAWPRODUCTS/HIER:PRODUCTS/LVL:PRODUCT/COL:SHAWPRODUCTS_ET;DIM:CS_OLAP.SHAWPROMOTIONS/HIER:PROMOTIONS/LVL:PROMOTION/COL:SHAWPROMOTIONS_ET;DIM:CS_OLAP.SHAWT_TIME/HIER:CALENDAR/LVL:MONTH/COL:SHAWT_TIME_ET;');
execute CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE('CS_OLAP','SHAWSALES','AMOUNT_SOLD_PCT_CHANGE_PP','CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','AMOUNT_SOLD_PCT_CHANGE_PP','DIM:CS_OLAP.SHAWCHANNELS/HIER:CHANNELS/LVL:CHANNEL/COL:SHAWCHANNELS_ET;DIM:CS_OLAP.SHAWGEOGRAPHIES/HIER:STANDARD/LVL:COUNTRY/COL:SHAWGEOGRAPHIES_ET;DIM:CS_OLAP.SHAWPRODUCTS/HIER:PRODUCTS/LVL:PRODUCT/COL:SHAWPRODUCTS_ET;DIM:CS_OLAP.SHAWPROMOTIONS/HIER:PROMOTIONS/LVL:PROMOTION/COL:SHAWPROMOTIONS_ET;DIM:CS_OLAP.SHAWT_TIME/HIER:CALENDAR/LVL:MONTH/COL:SHAWT_TIME_ET;');
execute CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE('CS_OLAP','SHAWSALES','AMOUNT_SOLD_PCT_CHANGE_YRAGO','CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','AMOUNT_SOLD_PCT_CHANGE_YRA','DIM:CS_OLAP.SHAWCHANNELS/HIER:CHANNELS/LVL:CHANNEL/COL:SHAWCHANNELS_ET;DIM:CS_OLAP.SHAWGEOGRAPHIES/HIER:STANDARD/LVL:COUNTRY/COL:SHAWGEOGRAPHIES_ET;DIM:CS_OLAP.SHAWPRODUCTS/HIER:PRODUCTS/LVL:PRODUCT/COL:SHAWPRODUCTS_ET;DIM:CS_OLAP.SHAWPROMOTIONS/HIER:PROMOTIONS/LVL:PROMOTION/COL:SHAWPROMOTIONS_ET;DIM:CS_OLAP.SHAWT_TIME/HIER:CALENDAR/LVL:MONTH/COL:SHAWT_TIME_ET;');
execute CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE('CS_OLAP','SHAWSALES','COSTS','CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','COSTS','DIM:CS_OLAP.SHAWCHANNELS/HIER:CHANNELS/LVL:CHANNEL/COL:SHAWCHANNELS_ET;DIM:CS_OLAP.SHAWGEOGRAPHIES/HIER:STANDARD/LVL:COUNTRY/COL:SHAWGEOGRAPHIES_ET;DIM:CS_OLAP.SHAWPRODUCTS/HIER:PRODUCTS/LVL:PRODUCT/COL:SHAWPRODUCTS_ET;DIM:CS_OLAP.SHAWPROMOTIONS/HIER:PROMOTIONS/LVL:PROMOTION/COL:SHAWPROMOTIONS_ET;DIM:CS_OLAP.SHAWT_TIME/HIER:CALENDAR/LVL:MONTH/COL:SHAWT_TIME_ET;');
execute CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE('CS_OLAP','SHAWSALES','COSTS_12MMA','CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','COSTS_12MMA','DIM:CS_OLAP.SHAWCHANNELS/HIER:CHANNELS/LVL:CHANNEL/COL:SHAWCHANNELS_ET;DIM:CS_OLAP.SHAWGEOGRAPHIES/HIER:STANDARD/LVL:COUNTRY/COL:SHAWGEOGRAPHIES_ET;DIM:CS_OLAP.SHAWPRODUCTS/HIER:PRODUCTS/LVL:PRODUCT/COL:SHAWPRODUCTS_ET;DIM:CS_OLAP.SHAWPROMOTIONS/HIER:PROMOTIONS/LVL:PROMOTION/COL:SHAWPROMOTIONS_ET;DIM:CS_OLAP.SHAWT_TIME/HIER:CALENDAR/LVL:MONTH/COL:SHAWT_TIME_ET;');
execute CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE('CS_OLAP','SHAWSALES','COSTS_6MMA','CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','COSTS_6MMA','DIM:CS_OLAP.SHAWCHANNELS/HIER:CHANNELS/LVL:CHANNEL/COL:SHAWCHANNELS_ET;DIM:CS_OLAP.SHAWGEOGRAPHIES/HIER:STANDARD/LVL:COUNTRY/COL:SHAWGEOGRAPHIES_ET;DIM:CS_OLAP.SHAWPRODUCTS/HIER:PRODUCTS/LVL:PRODUCT/COL:SHAWPRODUCTS_ET;DIM:CS_OLAP.SHAWPROMOTIONS/HIER:PROMOTIONS/LVL:PROMOTION/COL:SHAWPROMOTIONS_ET;DIM:CS_OLAP.SHAWT_TIME/HIER:CALENDAR/LVL:MONTH/COL:SHAWT_TIME_ET;');
execute CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE('CS_OLAP','SHAWSALES','COSTS_FCAST_BF','CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','COSTS_FCAST_BF','DIM:CS_OLAP.SHAWCHANNELS/HIER:CHANNELS/LVL:CHANNEL/COL:SHAWCHANNELS_ET;DIM:CS_OLAP.SHAWGEOGRAPHIES/HIER:STANDARD/LVL:COUNTRY/COL:SHAWGEOGRAPHIES_ET;DIM:CS_OLAP.SHAWPRODUCTS/HIER:PRODUCTS/LVL:PRODUCT/COL:SHAWPRODUCTS_ET;DIM:CS_OLAP.SHAWPROMOTIONS/HIER:PROMOTIONS/LVL:PROMOTION/COL:SHAWPROMOTIONS_ET;DIM:CS_OLAP.SHAWT_TIME/HIER:CALENDAR/LVL:MONTH/COL:SHAWT_TIME_ET;');
execute CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE('CS_OLAP','SHAWSALES','COSTS_PCT_CHANGE_PP','CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','COSTS_PCT_CHANGE_PP','DIM:CS_OLAP.SHAWCHANNELS/HIER:CHANNELS/LVL:CHANNEL/COL:SHAWCHANNELS_ET;DIM:CS_OLAP.SHAWGEOGRAPHIES/HIER:STANDARD/LVL:COUNTRY/COL:SHAWGEOGRAPHIES_ET;DIM:CS_OLAP.SHAWPRODUCTS/HIER:PRODUCTS/LVL:PRODUCT/COL:SHAWPRODUCTS_ET;DIM:CS_OLAP.SHAWPROMOTIONS/HIER:PROMOTIONS/LVL:PROMOTION/COL:SHAWPROMOTIONS_ET;DIM:CS_OLAP.SHAWT_TIME/HIER:CALENDAR/LVL:MONTH/COL:SHAWT_TIME_ET;');
execute CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE('CS_OLAP','SHAWSALES','COSTS_PCT_CHANGE_YRAGO','CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','COSTS_PCT_CHANGE_YRAGO','DIM:CS_OLAP.SHAWCHANNELS/HIER:CHANNELS/LVL:CHANNEL/COL:SHAWCHANNELS_ET;DIM:CS_OLAP.SHAWGEOGRAPHIES/HIER:STANDARD/LVL:COUNTRY/COL:SHAWGEOGRAPHIES_ET;DIM:CS_OLAP.SHAWPRODUCTS/HIER:PRODUCTS/LVL:PRODUCT/COL:SHAWPRODUCTS_ET;DIM:CS_OLAP.SHAWPROMOTIONS/HIER:PROMOTIONS/LVL:PROMOTION/COL:SHAWPROMOTIONS_ET;DIM:CS_OLAP.SHAWT_TIME/HIER:CALENDAR/LVL:MONTH/COL:SHAWT_TIME_ET;');
execute CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE('CS_OLAP','SHAWSALES','MARGIN_12MMA','CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','MARGIN_12MMA','DIM:CS_OLAP.SHAWCHANNELS/HIER:CHANNELS/LVL:CHANNEL/COL:SHAWCHANNELS_ET;DIM:CS_OLAP.SHAWGEOGRAPHIES/HIER:STANDARD/LVL:COUNTRY/COL:SHAWGEOGRAPHIES_ET;DIM:CS_OLAP.SHAWPRODUCTS/HIER:PRODUCTS/LVL:PRODUCT/COL:SHAWPRODUCTS_ET;DIM:CS_OLAP.SHAWPROMOTIONS/HIER:PROMOTIONS/LVL:PROMOTION/COL:SHAWPROMOTIONS_ET;DIM:CS_OLAP.SHAWT_TIME/HIER:CALENDAR/LVL:MONTH/COL:SHAWT_TIME_ET;');
execute CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE('CS_OLAP','SHAWSALES','MARGIN_6MMA','CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','MARGIN_6MMA','DIM:CS_OLAP.SHAWCHANNELS/HIER:CHANNELS/LVL:CHANNEL/COL:SHAWCHANNELS_ET;DIM:CS_OLAP.SHAWGEOGRAPHIES/HIER:STANDARD/LVL:COUNTRY/COL:SHAWGEOGRAPHIES_ET;DIM:CS_OLAP.SHAWPRODUCTS/HIER:PRODUCTS/LVL:PRODUCT/COL:SHAWPRODUCTS_ET;DIM:CS_OLAP.SHAWPROMOTIONS/HIER:PROMOTIONS/LVL:PROMOTION/COL:SHAWPROMOTIONS_ET;DIM:CS_OLAP.SHAWT_TIME/HIER:CALENDAR/LVL:MONTH/COL:SHAWT_TIME_ET;');
execute CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE('CS_OLAP','SHAWSALES','MARGIN_FCAST_BF','CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','MARGIN_FCAST_BF','DIM:CS_OLAP.SHAWCHANNELS/HIER:CHANNELS/LVL:CHANNEL/COL:SHAWCHANNELS_ET;DIM:CS_OLAP.SHAWGEOGRAPHIES/HIER:STANDARD/LVL:COUNTRY/COL:SHAWGEOGRAPHIES_ET;DIM:CS_OLAP.SHAWPRODUCTS/HIER:PRODUCTS/LVL:PRODUCT/COL:SHAWPRODUCTS_ET;DIM:CS_OLAP.SHAWPROMOTIONS/HIER:PROMOTIONS/LVL:PROMOTION/COL:SHAWPROMOTIONS_ET;DIM:CS_OLAP.SHAWT_TIME/HIER:CALENDAR/LVL:MONTH/COL:SHAWT_TIME_ET;');
execute CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE('CS_OLAP','SHAWSALES','MARGIN_PCT_CHANGE_PP','CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','MARGIN_PCT_CHANGE_PP','DIM:CS_OLAP.SHAWCHANNELS/HIER:CHANNELS/LVL:CHANNEL/COL:SHAWCHANNELS_ET;DIM:CS_OLAP.SHAWGEOGRAPHIES/HIER:STANDARD/LVL:COUNTRY/COL:SHAWGEOGRAPHIES_ET;DIM:CS_OLAP.SHAWPRODUCTS/HIER:PRODUCTS/LVL:PRODUCT/COL:SHAWPRODUCTS_ET;DIM:CS_OLAP.SHAWPROMOTIONS/HIER:PROMOTIONS/LVL:PROMOTION/COL:SHAWPROMOTIONS_ET;DIM:CS_OLAP.SHAWT_TIME/HIER:CALENDAR/LVL:MONTH/COL:SHAWT_TIME_ET;');
execute CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE('CS_OLAP','SHAWSALES','MARGIN_PCT_CHANGE_YRAGO','CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','MARGIN_PCT_CHANGE_YRAGO','DIM:CS_OLAP.SHAWCHANNELS/HIER:CHANNELS/LVL:CHANNEL/COL:SHAWCHANNELS_ET;DIM:CS_OLAP.SHAWGEOGRAPHIES/HIER:STANDARD/LVL:COUNTRY/COL:SHAWGEOGRAPHIES_ET;DIM:CS_OLAP.SHAWPRODUCTS/HIER:PRODUCTS/LVL:PRODUCT/COL:SHAWPRODUCTS_ET;DIM:CS_OLAP.SHAWPROMOTIONS/HIER:PROMOTIONS/LVL:PROMOTION/COL:SHAWPROMOTIONS_ET;DIM:CS_OLAP.SHAWT_TIME/HIER:CALENDAR/LVL:MONTH/COL:SHAWT_TIME_ET;');
execute CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE('CS_OLAP','SHAWSALES','MARGIN_PERCENT','CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','MARGIN_PERCENT','DIM:CS_OLAP.SHAWCHANNELS/HIER:CHANNELS/LVL:CHANNEL/COL:SHAWCHANNELS_ET;DIM:CS_OLAP.SHAWGEOGRAPHIES/HIER:STANDARD/LVL:COUNTRY/COL:SHAWGEOGRAPHIES_ET;DIM:CS_OLAP.SHAWPRODUCTS/HIER:PRODUCTS/LVL:PRODUCT/COL:SHAWPRODUCTS_ET;DIM:CS_OLAP.SHAWPROMOTIONS/HIER:PROMOTIONS/LVL:PROMOTION/COL:SHAWPROMOTIONS_ET;DIM:CS_OLAP.SHAWT_TIME/HIER:CALENDAR/LVL:MONTH/COL:SHAWT_TIME_ET;');
execute CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE('CS_OLAP','SHAWSALES','QUANTITY_SOLD','CS_OLAP','CS_O_SHAW_SHAWSALE14VIEW','QUANTITY_SOLD','DIM:CS_OLAP.SHAWCHANNELS/HIER:CHANNELS/LVL:CHANNEL/COL:SHAWCHANNELS_ET;DIM:CS_OLAP.SHAWGEOGRAPHIES/HIER:STANDARD/LVL:COUNTRY/COL:SHAWGEOGRAPHIES_ET;DIM:CS_OLAP.SHAWPRODUCTS/HIER:PRODUCTS/LVL:PRODUCT/COL:SHAWPRODUCTS_ET;DIM:CS_OLAP.SHAWPROMOTIONS/HIER:PROMOTIONS/LVL:PROMOTION/COL:SHAWPROMOTIONS_ET;DIM:CS_OLAP.SHAWT_TIME/HIER:CALENDAR/LVL:MONTH/COL:SHAWT_TIME_ET;');
execute cwm2_olap_validate.validate_Cube('CS_OLAP', 'SHAWSALES', 'OLAP API', 'NO');
execute cwm2_olap_metadata_refresh.mr_refresh();
commit
/
SPOOL OFF
quit;