[Mondrian] xmla servlet - bug in RowsetDefinition
Michele Rossi
michele.rossi at gmail.com
Wed May 25 04:00:35 EDT 2011
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.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.org [mailto:mondrian-bounces at pentaho.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.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20110525/bec43aaf/attachment.html
More information about the Mondrian
mailing list