About OLAP Schemas in OLAP DataGrid in Flex4


 

About OLAP Schemas in OLAP DataGrid in Flex4

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.

About OLAP Schemas in OLAP DataGrid in Flex4:

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:

0

<mx:OLAPCube name="Managesale"

dataProvider="{flatData}"

id="olapCube"

1

complete="runQuery(event);">

<mx:OLAPDimension name="ProductDim">

<mx:OLAPAttribute name="Product" dataField="product"/>

2

<mx:OLAPHierarchy name="ProductHier" hasAll="true">

<mx:OLAPLevel attributeName="Product"/>

</mx:OLAPHierarchy>

3

</mx:OLAPDimension>

<mx:OLAPDimension name="MonthDim">

<mx:OLAPAttribute name="Month" dataField="Month"/>

4

<mx:OLAPHierarchy name="MonthHier" hasAll="true">

<mx:OLAPLevel attributeName="Month"/>

</mx:OLAPHierarchy>

5

</mx:OLAPDimension>

<mx:OLAPDimension name="PriceDim">

<mx:OLAPAttribute name="Price" dataField="Price"/>

6

<mx:OLAPHierarchy name="PriceHier" hasAll="true">

<mx:OLAPLevel attributeName="Price"/>

</mx:OLAPHierarchy>

7

</mx:OLAPDimension>

<mx:OLAPMeasure name="TOtal"

dataField="total"/>

8

</mx:OLAPCube>

 

Ads