dprobst Posted August 13, 2009 Share Posted August 13, 2009 Hello, I have a problem when I run the MDX query from my logical schema.There is the following error message:Mondrian Error:Error while parsing MDX statement 'select {[Measures].OccupationFS} on columns, {[Annee].[All Annee]} on rowsfrom [CubeTest]'0 I think my schema is not correct, whil the data source is very simple: I put all the data in one Table but there are many rows:48 millions. This is the table, named KPSTOCKAGE ANNEE - VARCHAR(4) FS - VARCHAR(25) GROUPFS - VARCHAR(25) MOIS - VARCHAR(2) OccMoyenne(Mo) - DECIMAL(22, 0) TailleFS(Mo) - DECIMAL(22, 0) UH - CHARThank you.Code:the xml file and mdx query are joined Link to comment Share on other sites More sharing options...
jeromepineau Posted August 13, 2009 Share Posted August 13, 2009 Je pense qu'il faut utiliser .Members avec OccupationFS pour avoir le résultat.I could be wrong. Not an MDX expert but I've hit that problem before. Link to comment Share on other sites More sharing options...
swood Posted August 13, 2009 Share Posted August 13, 2009 Try: select {[Measures].[OccupationFS]} on columns, {[Annee].[All Annee]} on rowsfrom [CubeTest] Note the additional [] around OccupationFS. I suggest you try the Workbench. There functions for validation and testing of schemas, including automatic generation of MDX to exercise the schema. ShermanJaspersoft Link to comment Share on other sites More sharing options...
dprobst Posted August 14, 2009 Author Share Posted August 14, 2009 Hello, I haven't mentioned that I already had Jasper Workbench Analysis, and that one of my problem was thatI could not generate an MDX query automatically.I solved my problem adding some attributes to the <hierarchy> of the dimension and to the <level>The most important thing is to have in mind the following structure to define a dimension:<dimension><hierarchie><level><Table>.Some attributes are necessary.-the first dimension doesn't work( no MDX query generate)<Dimension type="TimeDimension" foreignKey="ANNEE" name="Annee" caption="ANNEE"><Hierarchy name="Default" hasAll="true" allMemberName="All Annee" primaryKey="ANNEE"><Table name="KPSTOCKAGE" schema="BGSADMIN" alias=""></Table><Level name="ANNEE" column="ANNEE" type="Time" uniqueMembers="false" levelType="TimeYears"> this way of definig a dimension work<Dimension type="TimeDimension" foreignKey="ANNEE" name="Annee"><Hierarchy hasAll="true" allMemberName="All Annee" primaryKey="ANNEE"><Table name="KPSTOCKAGE" schema="BGSADMIN"></Table><Level name="Annee" column="ANNEE" ordinalColumn="ANNEE" type="Time" uniqueMembers="true" levelType="TimeYears" hideMemberIf="Never"></Level></Hierarchy></Dimension>-->Solution:some attributes are necessary, but I can't say which one precisely.( I tried to delete some but it is still working).Thank you for your help. David Probst Link to comment Share on other sites More sharing options...
swood Posted August 14, 2009 Share Posted August 14, 2009 What problem did you have with generating the MDX? In the Hierarchy that had problems, I see: No need for the caption element Hierarchy name="Default" is wrong. No need for the name element if you only have 1 hierarchy in a dimension. If you enter a name, you have to refer to the Hierarchy in your MDX explicitly, like [Time.Default] ShermanJaspersoft Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now