Guest User

agent_trans

a guest
Apr 4th, 2016
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.81 KB | None | 0 0
  1. <?xml version="1.0"?>
  2. <Schema name="Phoenix" metamodelVersion="4.0">
  3.  <PhysicalSchema>
  4.     <Table name='AGENTS'>
  5.         <Key>
  6.             <Column name='A_ID'/>
  7.         </Key>
  8.     </Table>
  9.     <Table name='TRANSACTIONS'/>
  10.     <Table name='AG_TER_PRO'/>
  11.  </PhysicalSchema>
  12.  
  13.  <Dimension name='Agent Details' table='AGENTS' key='Agent Id'>
  14.     <Attributes>
  15.         <Attribute name='Agent Id' keyColumn='A_ID' hasHierarchy='false'/>
  16.         <Attribute name='Agent Name' keyColumn='A_NAME' hasHierarchy='false'/>
  17.         <Attribute name='Agent Role' keyColumn='A_ROLE' hasHierarchy='false'/>
  18.         <Attribute name='Agent Department' keyColumn='A_DEPARTMENT' hasHierarchy='false'/>
  19.     </Attributes>
  20.     <Hierarchies>
  21.         <Hierarchy name="Agent Attributes" allMemberName="All Agents">             
  22.             <Level attribute="Agent Name"/>
  23.         </Hierarchy>
  24.     </Hierarchies>
  25.  </Dimension>
  26.  
  27.  <Cube name="Agent Transactions">
  28.   <Dimensions>
  29.       <Dimension source="Agent Details"/>
  30.   </Dimensions>
  31.   <MeasureGroups>
  32.     <MeasureGroup name="Transactions" table='TRANSACTIONS'>
  33.         <Measures>
  34.             <Measure name='Total Sales' column='TOTAL_SALES' aggregator='sum' formatString='#,###.00' />
  35.             <Measure name='Total Expenses' column='TOTAL_EXPENSES' aggregator='sum' formatString='#,###.00'/>                      
  36.         </Measures>
  37.         <DimensionLinks>
  38.             <ForeignKeyLink dimension='Agent Details' foreignKeyColumn='AGENT_ID'/>
  39.         </DimensionLinks>
  40.     </MeasureGroup>
  41.    
  42.     <MeasureGroup table='AG_TER_PRO' type='aggregate'>
  43.         <Measures>
  44.             <MeasureRef name='Total Sales' aggColumn='SUM_TOTAL_SALES'/>
  45.             <MeasureRef name='Total Expenses' aggColumn='SUM_TOTAL_EXPENSES'/>     
  46.         </Measures>
  47.         <DimensionLinks>
  48.             <ForeignKeyLink dimension='Agent Details' foreignKeyColumn='AGENT_ID'/>
  49.         </DimensionLinks>
  50.     </MeasureGroup>
  51.   </MeasureGroups>
  52.  </Cube>
  53. </Schema>
Add Comment
Please, Sign In to add comment