Advertisement
Guest User

foodmart_aggregate

a guest
Apr 4th, 2016
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 3.05 KB | None | 0 0
  1. <?xml version='1.0'?>
  2. <Schema name='FoodMart' metamodelVersion='4.0'>
  3.     <!--
  4.    == This software is subject to the terms of the Eclipse Public License v1.0
  5.    == Agreement, available at the following URL:
  6.    == http://www.eclipse.org/legal/epl-v10.html.
  7.    == You must accept the terms of that agreement to use this software.
  8.    ==
  9.    == Copyright (C) 2000-2005 Julian Hyde
  10.    == Copyright (C) 2005-2013 Pentaho and others
  11.    == All Rights Reserved.
  12.    -->
  13.  
  14.     <PhysicalSchema>
  15.  
  16.         <Table name='store'>
  17.             <Key>
  18.                 <Column name='store_id'/>
  19.             </Key>
  20.         </Table>
  21.  
  22.         <Table name='sales_fact_1997'/>
  23.  
  24.         <Table name='agg_c_special_sales_fact_1997'/>
  25.  
  26.     </PhysicalSchema>
  27.    
  28.     <Dimension name='Store Dimension' table='store' key='Store Id'>
  29.         <Attributes>
  30.             <Attribute name='Store Country' hasHierarchy='false'>
  31.                 <Key>
  32.                     <Column name='store_country'/>
  33.                 </Key>
  34.             </Attribute>
  35.             <Attribute name='Store State' keyColumn='store_state' hasHierarchy='false'/>
  36.             <Attribute name='Store City' hasHierarchy='false'>
  37.                 <Key>
  38.                     <Column name='store_state'/>
  39.                     <Column name='store_city'/>
  40.                 </Key>
  41.                 <Name>
  42.                     <Column name='store_city'/>
  43.                 </Name>
  44.             </Attribute>
  45.             <Attribute name='Store Id' keyColumn='store_id' hasHierarchy='false'/>
  46.            
  47.         </Attributes>
  48.  
  49.         <Hierarchies>
  50.             <Hierarchy name='Stores' allMemberName='All Stores'>                
  51.                 <Level attribute='Store State'/>                
  52.             </Hierarchy>
  53.  
  54.         </Hierarchies>
  55.     </Dimension>
  56.    
  57.     <Cube name='Sales With Pre-aggregates'>
  58.         <Dimensions>
  59.  
  60.             <Dimension source='Store Dimension'/>
  61.         </Dimensions>
  62.        
  63.        
  64.         <MeasureGroups>
  65.             <MeasureGroup name='Sales' table='sales_fact_1997'>
  66.                 <Measures>                    
  67.                     <Measure name='Store Cost' column='store_cost' aggregator='sum' formatString='#,###.00'/>
  68.                     <Measure name='Store Sales' column='store_sales' aggregator='sum' formatString='#,###.00'/>                    
  69.                 </Measures>
  70.                 <DimensionLinks>
  71.                     <ForeignKeyLink dimension='Store Dimension' foreignKeyColumn='store_id'/>
  72.                 </DimensionLinks>
  73.             </MeasureGroup>
  74.             <MeasureGroup table='agg_c_special_sales_fact_1997' type='aggregate'>
  75.                 <Measures>                    
  76.                     <MeasureRef name='Store Cost' aggColumn='store_cost_sum'/>
  77.                     <MeasureRef name='Store Sales' aggColumn='store_sales_sum'/>
  78.                 </Measures>
  79.                 <DimensionLinks>
  80.                     <ForeignKeyLink dimension='Store Dimension' foreignKeyColumn='store_id'/>
  81.                 </DimensionLinks>
  82.             </MeasureGroup>
  83.     </MeasureGroups>
  84.     </Cube>
  85.    
  86. </Schema>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement