Skip to content

Instantly share code, notes, and snippets.

@EmielM
Created December 16, 2010 11:17
Show Gist options
  • Save EmielM/743296 to your computer and use it in GitHub Desktop.
Save EmielM/743296 to your computer and use it in GitHub Desktop.
Mondrian cube schema
<Schema name="TestSchema">
<Cube name="TestCube" caption="Caption" cache="false" enabled="true">
<Table name="SolarData"></Table>
<Dimension type="StandardDimension" name="Time">
<Hierarchy hasAll="true">
<Level name="Year" column="time" type="String" uniqueMembers="true">
<KeyExpression><SQL dialect="generic"><![CDATA[extract(year from time)]]></SQL></KeyExpression>
<NameExpression><SQL dialect="generic"><![CDATA[extract(year from time)]]></SQL></NameExpression>
</Level>
<Level name="Month" column="time" type="String" uniqueMembers="false">
<KeyExpression><SQL dialect="generic"><![CDATA[extract(year_month from time)]]></SQL></KeyExpression>
<NameExpression><SQL dialect="generic"><![CDATA[extract(month from time)]]></SQL></NameExpression>
</Level>
</Hierarchy>
</Dimension>
<Measure name="Temperature" column="T" datatype="Numeric" aggregator="avg" visible="true"></Measure>
</Cube>
</Schema>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment