OLAP Schema is used for to convert a flat data in to an OLAP cube.
OLAP Schema is used for to convert a flat data in to an OLAP cube.OLAP Schema is used for to convert a flat data in to an OLAP cube. You will create OLAP schema which is used for defines the dimensions of the cube. The fields of the flat data that supply the members along each dimensions and the measure for any point in the cube. we have the following flat data:
value:Object = {
product:"monitor"
month :"Jan"
price: "7000",
}
The general form of OLAP schema are following:
<fx:Declarations> <mx:OLAPCube name="Managesale" dataProvider="{flatData}" id="olapCube" complete="runQuery(event);"> <!-- Define dimensions. --> <mx:OLAPDimension ... /> . . . <mx:OLAPDimension ... /> ... <!-- Define measures. --> <mx:OLAPMeasure ... /> ... </mx:OLAPCube> </fx:Declarations> |
The general form of OLAP dimensions are following:
<mx:OLAPDimension name="MonthDim"> <mx:OLAPAttribute name="Month" dataField="Month"/> ... <mx:OLAPHierarchy name="MonthHier" hasAll="true"> <mx:OLAPLevel attributeName="Month"/> ... </mx:OLAPHierarchy> </mx:OLAPDimension> |
The OLAP schema according the above flat data are following:
<mx:OLAPCube name="Managesale" dataProvider="{flatData}" id="olapCube" complete="runQuery(event);"> <mx:OLAPDimension name="ProductDim"> <mx:OLAPAttribute name="Product" dataField="product"/> <mx:OLAPHierarchy name="ProductHier" hasAll="true"> <mx:OLAPLevel attributeName="Product"/> </mx:OLAPHierarchy> </mx:OLAPDimension> <mx:OLAPDimension name="MonthDim"> <mx:OLAPAttribute name="Month" dataField="Month"/> <mx:OLAPHierarchy name="MonthHier" hasAll="true"> <mx:OLAPLevel attributeName="Month"/> </mx:OLAPHierarchy> </mx:OLAPDimension> <mx:OLAPDimension name="PriceDim"> <mx:OLAPAttribute name="Price" dataField="Price"/> <mx:OLAPHierarchy name="PriceHier" hasAll="true"> <mx:OLAPLevel attributeName="Price"/> </mx:OLAPHierarchy> </mx:OLAPDimension> <mx:OLAPMeasure name="TOtal" dataField="total"/> </mx:OLAPCube> |