140 likes | 568 Views
Mondrian stuff Julian Hyde - Mondrian founder & lead developer 3 rd Pentaho Community meetup Cascais September 25 th 2010. What’s new. Analyzer Luc Boudreau olap4j 1.0 Mondrian 3.2 Mondrian 3.2.1 Mondrian 4.
E N D
Mondrian stuffJulian Hyde - Mondrian founder & lead developer3rd Pentaho Community meetupCascaisSeptember 25th 2010
What’s new • Analyzer • Luc Boudreau • olap4j 1.0 • Mondrian 3.2 • Mondrian 3.2.1 • Mondrian 4
Select [Measures].[Unit Sales] on 0, [Time].[2010].Children on 1from [Sales]where [Time].[2010] Solution: attribute-oriented MDX: Select [Measures].[Unit Sales] on 0, [Time].[Time].[2010].Children on 1from [Sales]where [Time].[Year].[2010] Schema: <Cube> <Dimension> <Attribute> <Hierarchy> <Level source=a> <MeasureGroup> <Measure> <DimensionLink> <AggTable> Pedrinho’s problem
Richer Semantic Model • Physical schema: • Only define attributes and relationships once • Compound keys • Attribute hierarchies • Hierarchies & attributes grouped into dimensions • E.g. Customers dimension contains Customer hierarchy (State-City-Customer) and Age, Gender, Salary attribute hierarchies
Measure groups • In Mondrian 3.x, if you want a cube with multiple fact tables, you build a virtual cube: • <Cube name=“Sales”> <Table name=“sales_fact”/></Cube><Cube name=“Warehouse”> <Table name=“warehouse_fact”/></Cube><VirtualCube name=“Warehouse and Sales”> <Cube name=“Sales”/> <Cube name=“Warehouse”/></VirtualCube>
Measure groups (2) • In Mondrian 4, cubes can contain multiple measure groups: • <Cube name=“Warehouse and Sales”> <MeasureGroups> <MeasureGroup name=“Sales”> <Table name=“sales_fact”/> <Measure name=“unit_sales”/> </MeasureGroup> <MeasureGroup name=“Warehouse”> <Table name=“warehousee_fact”/> <Measure name=“inventory_units”/> </MeasureGroup> </MeasureGroups></Cube> • Virtual cubes are obsolete(but still supported) • Many-to-many association betweenmeasure groups and dimensions • Different ways to link dimensions tofact tables
Physical schema • <Schema> • <PhysicalSchema> • <Table> • <Column> • <CalculatedColumn> • <Key> • <Link> • <Cube> • <Dimension> • <Attribute> • <Hierarchy> • <Level> • <MeasureGroup> • <Measure> • <DimensionLink> • <AggTable>
Schema validation • Mondrian 3 validation sucks • In mondrian 4, can validate at runtime or design time • Generate multiple warnings, errors • Each error has a location • Workbench should navigate to each error • Better validation in EE (!)
Transition to mondrian 4.0 • Not easy… • Backwards compatible • Workbench functionality: • Upgrade workbench • OR… extend agile BI • OR… extend metadata editor • OR… • Community can help!
Mondrian 4.0 summary • Attribute-oriented analysis • Physical model • Composite keys • Multiple fact tables • Virtual cubes obsolete • Better validation • Clean up of internals: • Make aggregate tables look like fact tables • Unify native SQL optimization, aggregate table usage, fact table selection • Transition will be hard… but worth it