Difference between revisions of "Tutorial/OLAP example"

From TempusServa wiki
Jump to navigation Jump to search
old>Admin
(Created page with ' === Cube definition === <Cube name="sample1cube"> <Table name="data_changemanagement"/> <Dimension name="Scope" foreignKey="TASKTYPE"> <Hierarchy hasAll="true" primaryKe…')
 
old>Admin
Line 4: Line 4:


   <Cube name="sample1cube">
   <Cube name="sample1cube">
<Table name="data_changemanagement"/>
    <Table name="data_changemanagement"/>
<Dimension name="Scope" foreignKey="TASKTYPE">
    <Dimension name="Scope" foreignKey="TASKTYPE">
<Hierarchy hasAll="true" primaryKey="LookupID">
      <Hierarchy hasAll="true" primaryKey="LookupID">
       <Table name="formfieldlookup"/>
       <Table name="formfieldlookup"/>
<Level name="Type" column="Value" uniqueMembers="true"/>
        <Level name="Type" column="Value" uniqueMembers="true"/>
</Hierarchy>
      </Hierarchy>
</Dimension>
    </Dimension>
<Dimension name="Type" foreignKey="TYPE">
    <Dimension name="Type" foreignKey="TYPE">
<Hierarchy hasAll="true" primaryKey="LookupID">
      <Hierarchy hasAll="true" primaryKey="LookupID">
       <Table name="formfieldlookup"/>
       <Table name="formfieldlookup"/>
<Level name="Type" column="Value" uniqueMembers="true"/>
        <Level name="Type" column="Value" uniqueMembers="true"/>
</Hierarchy>
      </Hierarchy>
</Dimension>
    </Dimension>
<Dimension name="Status" foreignKey="StatusID">
    <Dimension name="Status" foreignKey="StatusID">
<Hierarchy hasAll="true" primaryKey="StatusID">
      <Hierarchy hasAll="true" primaryKey="StatusID">
       <Table name="formstatus"/>
       <Table name="formstatus"/>
<Level name="Type" column="Status" uniqueMembers="true"/>
        <Level name="Type" column="Status" uniqueMembers="true"/>
</Hierarchy>
      </Hierarchy>
</Dimension>
    </Dimension>
<Dimension name="Period" type="TimeDimension">
    <Dimension name="Period" type="TimeDimension">
<Hierarchy name="Periode" hasAll="true" allMemberName="All period">
      <Hierarchy name="Periode" hasAll="true" allMemberName="All period">
<Table name="data_changemanagement"/>
        <Table name="data_changemanagement"/>
<Level name="Aar" levelType="TimeYears" uniqueMembers="true">
        <Level name="Aar" levelType="TimeYears" uniqueMembers="true">
<KeyExpression>
          <KeyExpression>
<SQL dialect="mysql">Year(CreatedAt)</SQL>
            <SQL dialect="mysql">Year(CreatedAt)</SQL>
<SQL dialect="generic">YEAR</SQL>
            <SQL dialect="generic">YEAR</SQL>
</KeyExpression>
          </KeyExpression>
</Level>
        </Level>
<Level name="Kvartal" uniqueMembers="false" levelType="TimeQuarters">
        <Level name="Kvartal" uniqueMembers="false" levelType="TimeQuarters">
<KeyExpression>
          <KeyExpression>
<SQL dialect="mysql">Quarter(CreatedAt)</SQL>
            <SQL dialect="mysql">Quarter(CreatedAt)</SQL>
<SQL dialect="generic">Quarter</SQL>
            <SQL dialect="generic">Quarter</SQL>
</KeyExpression>
          </KeyExpression>
</Level>
        </Level>
<Level name="Maaned" uniqueMembers="false" levelType="TimeMonths">
        <Level name="Maaned" uniqueMembers="false" levelType="TimeMonths">
<KeyExpression>
          <KeyExpression>
<SQL dialect="mysql">Month(CreatedAt)</SQL>
            <SQL dialect="mysql">Month(CreatedAt)</SQL>
<SQL dialect="generic">Month</SQL>
            <SQL dialect="generic">Month</SQL>
</KeyExpression>
          </KeyExpression>
</Level>
        </Level>
</Hierarchy>
      </Hierarchy>
</Dimension>
    </Dimension>
<Measure name="Revision" column="Revision" aggregator="sum" formatString="Standard"/>   
    <Measure name="Revision" column="Revision" aggregator="sum" formatString="Standard"/>   
<Measure name="Estimate" column="ESTIMATTIMER" aggregator="sum" formatString="Standard"/>   
    <Measure name="Estimate" column="ESTIMATTIMER" aggregator="sum" formatString="Standard"/>   
<Measure name="Realized" column="REALISERETTIMER" aggregator="sum" formatString="Standard"/>   
    <Measure name="Realized" column="REALISERETTIMER" aggregator="sum" formatString="Standard"/>   
   </Cube>
   </Cube>

Revision as of 01:09, 28 November 2013


Cube definition

 <Cube name="sample1cube">
<Dimension name="Scope" foreignKey="TASKTYPE"> <Hierarchy hasAll="true" primaryKey="LookupID">
<Level name="Type" column="Value" uniqueMembers="true"/> </Hierarchy> </Dimension> <Dimension name="Type" foreignKey="TYPE"> <Hierarchy hasAll="true" primaryKey="LookupID">
<Level name="Type" column="Value" uniqueMembers="true"/> </Hierarchy> </Dimension> <Dimension name="Status" foreignKey="StatusID"> <Hierarchy hasAll="true" primaryKey="StatusID">
<Level name="Type" column="Status" uniqueMembers="true"/> </Hierarchy> </Dimension> <Dimension name="Period" type="TimeDimension"> <Hierarchy name="Periode" hasAll="true" allMemberName="All period">
<Level name="Aar" levelType="TimeYears" uniqueMembers="true"> <KeyExpression> <SQL dialect="mysql">Year(CreatedAt)</SQL> <SQL dialect="generic">YEAR</SQL> </KeyExpression> </Level> <Level name="Kvartal" uniqueMembers="false" levelType="TimeQuarters"> <KeyExpression> <SQL dialect="mysql">Quarter(CreatedAt)</SQL> <SQL dialect="generic">Quarter</SQL> </KeyExpression> </Level> <Level name="Maaned" uniqueMembers="false" levelType="TimeMonths"> <KeyExpression> <SQL dialect="mysql">Month(CreatedAt)</SQL> <SQL dialect="generic">Month</SQL> </KeyExpression> </Level> </Hierarchy> </Dimension> <Measure name="Revision" column="Revision" aggregator="sum" formatString="Standard"/> <Measure name="Estimate" column="ESTIMATTIMER" aggregator="sum" formatString="Standard"/> <Measure name="Realized" column="REALISERETTIMER" aggregator="sum" formatString="Standard"/> </Cube>