Using JPalo with OLAP Data Grid from Adobe Flex

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Using JPalo with OLAP Data Grid from Adobe Flex

      Hello everybody,

      Currently I am trying to use the OLAP Data Grid component from Adobe Flex for displaying data out of PALO.

      Until now I created some webservices that uses JPALO to give me lists of cubes and their dimension.

      The next step would be to create the OLAP schema in my Flex Application.
      That's the problem I am stucked at the moment. In Flex there is a different structure or at least names that are used. More about that can be found in this chapter.

      I have objects representing this structure and want to populate them with the attributes and hierachies out of PALO.
      My aim is to get the structure to dynamically create the schema in Flex. For this I need something like this:

      Source Code

      1. <mx:OLAPDimension name="CustomerDim">
      2. <mx:OLAPAttribute name="Customer" dataField="customer"/>
      3. <mx:OLAPHierarchy name="CustomerHier" hasAll="true">
      4. <mx:OLAPLevel attributeName="Customer"/>
      5. </mx:OLAPHierarchy>
      6. </mx:OLAPDimension>

      Does anybody know where I can get the Attributes for a dimension? In JPalo there is a function Dimension.getAttributes but its deprecated and Hierarchy.getAttributes() should be used. Where can I get my attributes and where can I get the dataField for them?

      Maybe I am thinking to complicated and I have to use JPalo to store my data as flat data in an XML String and cannot get it out of my objects.

      Feel free to ask if there is anything unclear or you need further information.

    • RE: Using JPalo with OLAP Data Grid from Adobe Flex

      Hi Thomas,

      I may be over-simplifying your problem - if so, sorry!
      You're almost there with Dimension.getAttributes() and I guess your problem is that you are unsure how to use Hierarchy.getAttributes().

      Palo does not formally implement hierarchies, but the Java API is designed to enable access to Palo AND XMLA-based datasources. Since hierarchies are an integral part of MDX, the Java API implements them, but it confuses matters when you want to access a Palo datasource. In short, Dimension.getHierarchies(), when applied to a Palo dimension, will ALWAYS deliver an array of length 1, since a Palo dimension can only have one hierarchy.
      Anyway, that's the background.

      The answer to your question, in short (I think):


      and then for each Attribute, Attribute.getName(). That should be all you need to get the attribute names into your XML format.


    • Hi Russ,

      thanks for your reply and thanks for the information about hierachies in PALO.
      I spent my time using different methods to get my data and finally I recognised that there is a different in Flex Attributes and PALO Attributes.

      In Flex I need an object or an array per cell that represents the data in a flat state, so for example

      Source Code

      1. data:Object = {
      2. customer:"Customer's Name",
      3. product:"Palo Client",
      4. region:"Germany",
      5. month:"Jan",
      6. revenue:"100.00"
      7. }

      The keys (customer, product, month etc.) is what Flex defines as attributes and in the shema of my previous post I define the dataField within such an object or array.

      So for now, I am getting my Cell Objects out of Palo and convert them to an object where I have my name value pairs. So I am representing my data in a flat state.

      My next problem is to show consolidated structures in a flat state. That would be a nice recursive method.
      I read about exporting data from ETL Server as flat files, do you know if there is a possibility to do this with the Java API? Can I do such an export with the ExportDataset or the FlatSate? Until now, I've seen the ExportDataset only for filtering values, but you still get a Cell Object back.

      Otherwise I have to implement a flat file export for myself.

    • Hi Thomas,

      I'm not quite sure what you mean by "show consolidated structures in a flat state"! Are you differentiating between N: (base) and C: (consolidated) elements in a dimension?

      I use ExportDataset to generate an extract from a Palo cube, and then use Cube.getDimensions to get the dimension names and for each cell in the ExportDataset, Cell.getCoordinates to get the element names or "attributes" using Flex terminology. In principle, you're correct - there is to my knowledge no method in the API which generates a flat structure out of data in a cube, but it shouldn't be too hard to do it using these building blocks.


    • Hi Russ,

      I am using Cell.getCoordinates and the Cube.getDimensions, too.

      What I mean with consolidation is that the elements in a dimension are grouped together. For example the "Time" dimension could have such a structure:

      Source Code

      1. Year
      2. Quarter 1
      3. Jan
      4. Feb
      5. Mar
      6. Quarter 2
      7. Apr
      8. May
      9. ...
      10. Quarter 3
      11. Quarter 4
      Display All

      I think "Year" would be the base element and the other are consolidated elements.

      If i understand the idea behind flat files right there should be one key - value pair for every level. So the minimum keys for the above example will be
      • year
      • quarter
      • month
      and the same have to be done with all dimensions to get the complete data into a flat file.


      The post was edited 1 time, last by Thomas147 ().