[Mondrian] Presentation and doubt

Diego Dimunzio ddimunzio at gmail.com
Fri Apr 17 13:48:30 EDT 2009


Julian,

Yes, you are right that post was based in your blog, It was the first link I
found today when was looking for an post about it.

Btw. I have some questions.

1-  Does someone have tried to use a member reader?
 According with the documentation you have to implement “
mondrian.rolap.MemberSource<http://mondrian.pentaho.org/api/mondrian/rolap/MemberSource.html>”
but this interface use “mondrian.rolap.MemberCache” which is not a public
interface then you can’t implement the method setCache (MemberCache cache)


2-  I am trying to do something that I not sure if it’s possible

I have a dimension which comes from the fact table and I added selection
criteria to filter out the result.



<Dimension name=*"Dname"*>

<Hierarchy hasAll=*"true"* allMemberName=*"All Dname"*>

<Table name=*"Dtable"*>

     <SQL dialect=*"mysql"*>* Dtable* .classification_name = 'Primary'</SQL>

</Table>

<Level name=*"Primary D"* column=*"dname"*/>

</Hierarchy>

</Dimension>

It works properly, Then I would like to have a measure like this

<Measure name=*"Actual"* aggregator=*"sum"* >

<MeasureExpression>

      <SQL dialect=*"mysql"*>case when *Dtable*.type=0

Then *Dtable*.amount/CustomSqlfunction(*Dtable.currencycode*)

 else 0 end

      </SQL>

</MeasureExpression>

</Measure>



The measure works for all dimensions members due Mondrian add the dimension
filter in the query it makes, but in the total (the first hierarchy)
mondrian only use the raw measure without that filter, so the grand total is
wrong.

Do you know if there a way to make it work?

Thanks in advance.
Diego

On Fri, Apr 17, 2009 at 1:44 PM, Julian Hyde <jhyde at pentaho.com> wrote:

>  That forum post is based on a blog entry that I wrote while I was
> implementing the cache control API. Cache control is now in mondrian's
> official documentation:
> http://mondrian.pentaho.org/documentation/cache_control.php
>
> Recently we added some experimental methods to the CacheControl API to
> control the dimension cache, for example
>
> void *execute*(CacheControl.MemberEditCommand cmd)
>
> Lastly, there is the schema cache. This is probably what you are
> interested in here. That is the policy that determines whether mondrian
> should re-read the schema.xml file when a new connection is established, or
> whether it should share metadata with existing connections that use the same
> schema URI. See
> http://mondrian.pentaho.org/documentation/configuration.php#Schema_cache
>
> Julian
>
>  ------------------------------
> *From:* mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org]
> *On Behalf Of *Diego Dimunzio
> *Sent:* Friday, April 17, 2009 5:47 AM
> *To:* Mondrian developer mailing list
> *Subject:* Re: [Mondrian] Presentation and doubt
>
> Hello Javier,
> I far I know it's normal even when you flush the mondrian cache by hand,
> there is no wait to clear the dimension cache.
> Here is a good post about it.
> http://forums.pentaho.org/archive/index.php/t-51518.html
>
> Regards
> Diego
>
> On Fri, Apr 17, 2009 at 8:25 AM, Javier Chávez B. <jchavezb at gmail.com>wrote:
>
>>
>>
>>  On Fri, Apr 17, 2009 at 1:56 AM, Ken Cheng <pubdevgroup at gmail.com>wrote:
>>
>>> Hi Javier,
>>>         Seems your schema file is not a well-formated xml file.
>>> change "<Table name="Categories">" to '<Table name="Categories"/>" and
>>> have a try
>>>
>>
>> Thanks to all for your councils ... already have my little  cube running
>> :0) .. the principal problem was the cache refresh .. so any time that
>> change my XML i've to restart my Tomcat ... is this normal??
>>
>> Best Regard.
>>
>> Javier.
>>
>>
>>
>>
>>> Sherman Wood wrote:
>>>
>>>>
>>>> You need to add a Level to the Hierarchy.
>>>>
>>>>
>>>> Sherman
>>>>
>>>>
>>>> *From:* mondrian-bounces at pentaho.org [mailto:
>>>> mondrian-bounces at pentaho.org] *On Behalf Of *Javier Chávez B.
>>>> *Sent:* Thursday, April 16, 2009 8:58 AM
>>>> *To:* mondrian at pentaho.org
>>>> *Subject:* [Mondrian] Presentation and doubt
>>>>
>>>>
>>>> Hi all.. sorry for my english but i'm learning :0)
>>>>
>>>> Dear all i need some orientation about a cube that i'm trying to do...
>>>>
>>>> i've made an MDX with the structure as follow:
>>>>
>>>> <Schema name="Cubo" >
>>>>    <Cube name="Cubo" cache="true" enabled="true">
>>>>        <Table name="Payment_Worker" alias="Fact_Table">
>>>>        </Table>
>>>>        <Dimension name="Category"  foreignKey="Cat_Id" >
>>>>            <Hierarchy hasAll="true" allMemberName="All Categories"
>>>>  primaryKey="Cat_Id" defaultMember="All Categories">
>>>>                <Table name="Categories">
>>>>            </Hierarchy>
>>>>        </Dimension>
>>>>        <Measure name="Payment" column="paw_Totalpay" datatype="Numeric"
>>>> aggregator="sum" visible="true">
>>>>        </Measure>
>>>>    </Cube>
>>>> </Schema>
>>>>
>>>> also  i've the next Query :
>>>>
>>>> select
>>>>  {[Measures].[Payment]} on columns,
>>>>  {([Category].[All Categories])} ON rows
>>>> from Cubo
>>>>
>>>> but when try to run this query i get the next error:
>>>>
>>>>
>>>>    org.apache.jasper.JasperException: javax.servlet.ServletException:
>>>>    javax.servlet.jsp.JspException: org.apache.jasper.JasperException:
>>>>    javax.servlet.ServletException: javax.servlet.jsp.JspException:
>>>>    com.tonbeller.jpivot.olap.model.OlapException: Mondrian Error:MDX
>>>>    object '[Category].[All Categories]' not found in cube 'Cubo'
>>>>
>>>> Somebody can help or orient about what i'm doing wrong... sorry if the
>>>> question is very basic !!!
>>>>
>>>> Thanks in advice.
>>>>
>>>> Javier.
>>>>
>>>> --
>>>> Cumprimentos
>>>> jchavez
>>>> linux User #397972 on http://counter.li.org/
>>>>
>>>> Groucho Marx <
>>>> http://www.brainyquote.com/quotes/authors/g/groucho_marx.html>  - "A
>>>> child of five would understand this. Send someone to fetch a child of five."
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>>
>>>> _______________________________________________
>>>> Mondrian mailing list
>>>> Mondrian at pentaho.org
>>>> http://lists.pentaho.org/mailman/listinfo/mondrian
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Mondrian mailing list
>>> Mondrian at pentaho.org
>>> http://lists.pentaho.org/mailman/listinfo/mondrian
>>>
>>
>>
>>
>> --
>> Cumprimentos
>> jchavez
>> linux User #397972 on http://counter.li.org/
>>
>> Groucho Marx<http://www.brainyquote.com/quotes/authors/g/groucho_marx.html> - "A child of five would understand this. Send someone to fetch a child of
>> five."
>> _______________________________________________
>> Mondrian mailing list
>> Mondrian at pentaho.org
>> http://lists.pentaho.org/mailman/listinfo/mondrian
>>
>>
>
>
> --
> Diego Andres Dimunzio
>
>
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
>
>


-- 
Diego Andres Dimunzio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20090417/aa713574/attachment.html 


More information about the Mondrian mailing list