Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: [Mondrian] xmla servlet - bug in RowsetDefinition

  1. #1
    Michele Rossi Guest

    Default [Mondrian] xmla servlet - bug in RowsetDefinition

    Hi,
    I've discovered another part of RowsetDefinition which can only work
    reliably using the mondrian olap4j driver.

    The line number is 5096 and the code snippet in question is the following:

    protected void populateCatalog(
    OlapConnection connection,
    Catalog catalog,
    List<Row> rows)
    throws XmlaException, SQLException
    {
    // SQL Server actually includes the LEVELS_LIST row
    StringBuilder buf = new StringBuilder(100);

    for (Schema schema : filter(catalog.getSchemas(),
    schemaNameCond)) {
    for (Cube cube : filter(sortedCubes(schema), cubeNameCond))
    {
    Dimension measuresDimension =
    cube.getDimensions().get(0);
    Hierarchy measuresHierarchy =
    measuresDimension.getHierarchies().get(0);


    As you can see there is a strong assumption made here: that the first
    dimension in the list contains the Measures.
    The right way to do this is to iterate through the array and stop when
    "dimension type" is MEASURE.

    Thanks,
    Michele

    _______________________________________________
    Mondrian mailing list
    Mondrian (AT) pentaho (DOT) org
    http://lists.pentaho.org/mailman/listinfo/mondrian

  2. #2
    Julian Hyde Guest

    Default RE: [Mondrian] xmla servlet - bug in RowsetDefinition

    The first dimension is always "Measures". (Note that when you define a cube,
    you don't define a Measures dimension -- Mondrian creates it for you.)


    _____

    From: mondrian-bounces (AT) pentaho (DOT) org [mailto:mondrian-bounces (AT) pentaho (DOT) org] On
    Behalf Of Michele Rossi
    Sent: Tuesday, May 24, 2011 6:22 AM
    To: Mondrian developer mailing list
    Subject: [Mondrian] xmla servlet - bug in RowsetDefinition


    Hi,
    I've discovered another part of RowsetDefinition which can only work
    reliably using the mondrian olap4j driver.

    The line number is 5096 and the code snippet in question is the following:

    protected void populateCatalog(
    OlapConnection connection,
    Catalog catalog,
    List<Row> rows)
    throws XmlaException, SQLException
    {
    // SQL Server actually includes the LEVELS_LIST row
    StringBuilder buf = new StringBuilder(100);

    for (Schema schema : filter(catalog.getSchemas(),
    schemaNameCond)) {
    for (Cube cube : filter(sortedCubes(schema), cubeNameCond))
    {
    Dimension measuresDimension =
    cube.getDimensions().get(0);
    Hierarchy measuresHierarchy =
    measuresDimension.getHierarchies().get(0);


    As you can see there is a strong assumption made here: that the first
    dimension in the list contains the Measures.
    The right way to do this is to iterate through the array and stop when
    "dimension type" is MEASURE.

    Thanks,
    Michele


    _______________________________________________
    Mondrian mailing list
    Mondrian (AT) pentaho (DOT) org
    http://lists.pentaho.org/mailman/listinfo/mondrian

  3. #3
    Michele Rossi Guest

    Default Re: [Mondrian] xmla servlet - bug in RowsetDefinition

    hi Julian,
    I am sure this is the case in the mondrian implementation of olap4j but this
    is another olap4j implementation constraint that it's hard to enforce /
    document.

    I've changed my olap4j driver to accommodate this behaviour but I don't
    think it's reasonable to expect this from a generic olap4j driver.

    thanks,
    Michele

    On 25 May 2011 00:32, Julian Hyde <jhyde (AT) pentaho (DOT) com> wrote:

    > The first dimension is always "Measures". (Note that when you define a
    > cube, you don't define a Measures dimension -- Mondrian creates it for you.)
    >
    > ------------------------------
    > *From:* mondrian-bounces (AT) pentaho (DOT) org [mailto:mondrian-bounces (AT) pentaho (DOT) org]
    > *On Behalf Of *Michele Rossi
    > *Sent:* Tuesday, May 24, 2011 6:22 AM
    > *To:* Mondrian developer mailing list
    > *Subject:* [Mondrian] xmla servlet - bug in RowsetDefinition
    >
    > Hi,
    > I've discovered another part of RowsetDefinition which can only work
    > reliably using the mondrian olap4j driver.
    >
    > The line number is 5096 and the code snippet in question is the following:
    >
    > protected void populateCatalog(
    > OlapConnection connection,
    > Catalog catalog,
    > List<Row> rows)
    > throws XmlaException, SQLException
    > {
    > // SQL Server actually includes the LEVELS_LIST row
    > StringBuilder buf = new StringBuilder(100);
    >
    > for (Schema schema : filter(catalog.getSchemas(),
    > schemaNameCond)) {
    > for (Cube cube : filter(sortedCubes(schema), cubeNameCond))
    > {
    > Dimension measuresDimension =
    > cube.getDimensions().get(0);
    > Hierarchy measuresHierarchy =
    > measuresDimension.getHierarchies().get(0);
    >
    >
    > As you can see there is a strong assumption made here: that the first
    > dimension in the list contains the Measures.
    > The right way to do this is to iterate through the array and stop when
    > "dimension type" is MEASURE.
    >
    > Thanks,
    > Michele
    >
    >
    > _______________________________________________
    > Mondrian mailing list
    > Mondrian (AT) pentaho (DOT) org
    > http://lists.pentaho.org/mailman/listinfo/mondrian
    >
    >


    _______________________________________________
    Mondrian mailing list
    Mondrian (AT) pentaho (DOT) org
    http://lists.pentaho.org/mailman/listinfo/mondrian

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.