[Mondrian] <Query> element inside <Hierarchy> not working - mondrian version 3.0.3.11016

Agustin Campos aguscampos at terra.es
Mon May 19 10:44:38 EDT 2008


I am not very sure but *I think* the problem is that you are asking a third
dimension instead the two ones you have defined.

People around here will tell us if I am wrong or not.

2008/5/19 Radha Ranjan Madhaw <RMadhaw at facetime.com>:

>  Hi,
>
>
>
> I've the following Dimension definition:
>
>
>
> <Dimension name="DimUsers">
>
>             <Hierarchy hasAll="true" primaryKey="id">
>
>                         <Query>
>
>                                     <SQL dialect="generic">
>
> select "ug"."id" as "id", "ug"."userid" "userid", "u"."fullname"
> "fullname", "ug"."groupid" "groupid", "g"."groupname" "groupname"
>
> from "user_group" as "ug", "users" as "u", "groups" as "g"
>
> where "ug"."userid"  = "u"."userid"
>
> and   "ug"."groupid" = "g"."groupid"
>
>                                     </SQL>
>
>                         </Query>
>
>                         <Level name="User Name" column="fullname"
> type="String" uniqueMembers="false"/>
>
>                         <Level name="Group Name" column="groupname"
> type="String" uniqueMembers="false"/>
>
>             </Hierarchy>
>
> </Dimension>
>
>
>
> …and using it in cube MondrianTest as following…
>
>
>
> <DimensionUsage name="DimUsers" source="DimUsers"
> foreignKey="user_groupid"/>
>
>
>
> user_groupid is the foreign key present in the fact table 'fact_url_hits'
> of cube MondrianTest.
>
>
>
> When I execute the MDX query:
>
>
>
> SELECT {[Measures].[URL Hits]} ON COLUMNS, NON EMPTY
> {[Time].[2008].Children} ON ROWS FROM [MondrianTest] WHERE [DimUsers].[Group
> Name].[group5]
>
>
>
> I get the following exception:
>
>
>
> Caused by: *mondrian.olap.MondrianException*: Mondrian Error:MDX object
> '[DimUsers].[Group Name].[group5]' not found in cube 'MondrianTest'
>
>       at mondrian.resource.MondrianResource$_Def1.ex(*
> MondrianResource.java:807*)
>
>       at mondrian.olap.Util.lookup(*Util.java:766*)
>
>       at mondrian.olap.Id.accept(*Id.java:105*)
>
>       at mondrian.olap.Query$StackValidator.validate(*Query.java:1245*)
>
>       at mondrian.olap.QueryAxis.validate(*QueryAxis.java:269*)
>
>       at mondrian.olap.Query.resolve(*Query.java:567*)
>
>       at mondrian.olap.Query.resolve(*Query.java:413*)
>
>       at mondrian.olap.Query.<init>(*Query.java:217*)
>
>       at mondrian.olap.Query.<init>(*Query.java:177*)
>
>       at mondrian.olap.Parser.makeQuery(*Parser.java:860*)
>
>       at mondrian.olap.CUP$Parser$actions.CUP$Parser$do_action(*
> Parser.java:1693*)
>
>       at mondrian.olap.Parser.do_action(*Parser.java:694*)
>
>       at java_cup.runtime.lr_parser.parse(*lr_parser.java:569*)
>
>       at mondrian.olap.Parser.parseInternal(*Parser.java:764*)
>
>       ... 7 more
>
>
>
> I hope that the structure and position of <Query> element are correct as
> I've followed the Foodmart.xml sample.
>
>
>
> Not able to understand why I'm getting the error that the object
> [DimUsers].[Group Name].[group5] is not found in the cube.
>
> Any help will be appreciated.
>
>
>
> Thanks,
>
> Madhav
>
>
>
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
>
>


-- 
Agustín Campos Muñoz
http://www.acampos.net

Email: aguscamposENgmailPUNTOcom
acamposENiiesPUNTOes
MSN Messenger: acampozENhotmailPUNTOcom
Skype: acamposnet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20080519/34ab0df7/attachment.html 


More information about the Mondrian mailing list