From cybernelly at gmail.com Fri Jul 2 12:49:21 2010 From: cybernelly at gmail.com (Anton Nikitin) Date: Fri, 02 Jul 2010 20:49:21 +0400 Subject: [Mondrian] ParentChild hierarchy in Mondrian 3.2 In-Reply-To: References: <4C2B3D53.3000301@gmail.com> Message-ID: <4C2E1891.70608@gmail.com> I can't agree with you about nullParentValue attribute -- this one is used to indicate which member is a root (real root, not the allmember). Our hierarchy has a single root and it has "-1" in PARENTID column. However, I removed it and tried to drill into AllMember -- no effect. I removed hideMemberIf -- no effect. ANCESTORID in Oracle DDL is defined as Integer, but probably returned in JDBC metadata as NUMBER (one of these funny Oracle tricks). I have checked SQL: no difference when typing "1000.0" or "1000". The first things which seems to be very surprising is why it logs that query returns 0 rows, while it doesn't? What is the logic around this output? Doesn't it simply return the number of rows in ResultSet? Also I noticed a recent bug: http://jira.pentaho.com/browse/MONDRIAN-767 Although it talks about virtual cubes, the description looks very similar to my case... Thanks. Anton 01.07.2010 3:32, Julian Hyde wrote: > The attributes hideMemberIf and nullParentValue are usually only used > in ragged hierarchies. Do the problems go away if you remove them? > I notice that it is joining to '... = 1000.0'. Is ANCESTORID an > integer in the database? Does that query return different results if > you change 1000.0 to 1000? > Julian > > ------------------------------------------------------------------------ > *From:* mondrian-bounces at pentaho.org > [mailto:mondrian-bounces at pentaho.org] *On Behalf Of *Anton Nikitin > *Sent:* Wednesday, June 30, 2010 5:49 AM > *To:* mondrian at pentaho.org > *Subject:* [Mondrian] ParentChild hierarchy in Mondrian 3.2 > > I am experiencing some difficulties after upgrading from 3.1.2 to > 3.2.0 with parent-child hierarchy. > > I have a hierarchy defined as follows: > > > primaryKey="NODEID"> > > > nameColumn="RISKGROUPNAME" > parentColumn="PARENT" nullParentValue="-1" > type="Numeric" uniqueMembers="true" > levelType="Regular" hideMemberIf="Never"> > >
> > > > > > And with such definition it returns empty cells if MDX includes > any member from this hierarchy other than AllMember. > If I comment out closure definition it starts to work correctly. > > During analysis I found the following in Mondrian log: > > > [2010-06-30 16:26:51,896] [DEBUG] (RolapUtil ) > Segment.load: executing sql [select > "RISKGROUPCLOSURE"."ANCESTORID" as "c0", > sum("DAILYCFBYRISKGROUPHIERARCHY"."STRESSCFAMOUNTPLUS"+"DAILYCFBYRISKGROUPHIERARCHY"."STRESSCFAMOUNTMINUS") > as "m0" from " > RISKGROUPCLOSURE" "RISKGROUPCLOSURE", > "DAILYCFBYRISKGROUPHIERARCHY" "DAILYCFBYRISKGROUPHIERARCHY" where > "DAILYCFBYRISKGROUPHIERARCHY"."NODEID" = > "RISKGROUPCLOSURE"."NODEID" and "RISKGROUPCLOSURE"."ANCESTORID" = > 1000.0 group by "RISKGROUPCLOSURE"."ANCESTORID"], exec 15 ms > > [2010-06-30 16:26:51,896] [DEBUG] [/lrm230] > [OTIDO\aln at 192.168.1.171] - (RolapUtil ) Segment.load: > done executing sql [select "RISKGROUPCLOSURE"."ANCESTORID" as > "c0", > sum("DAILYCFBYRISKGROUPHIERARCHY"."STRESSCFAMOUNTPLUS"+"DAILYCFBYRISKGROUPHIERARCHY"."STRESSCFAMOUNTMINUS") > as "m0" from "RISKGROUPCLOSURE" "RISKGROUPCLOSURE", > "DAILYCFBYRISKGROUPHIERARCHY" "DAILYCFBYRISKGROUPHIERARCHY" where > "DAILYCFBYRISKGROUPHIERARCHY"."NODEID" = > "RISKGROUPCLOSURE"."NODEID" and "RISKGROUPCLOSURE"."ANCESTORID" = > 1000.0 group by "RISKGROUPCLOSURE"."ANCESTORID"], *exec+fetch 15 > ms, 0 rows* > > [2010-06-30 16:26:51,896] [DEBUG] [/lrm230] > [OTIDO\aln at 192.168.1.171] - (FastBatchingCellReader$Batch) > Batch.loadAggregation (millis) 15 > [2010-06-30 16:26:51,896] [DEBUG] [/lrm230] > [OTIDO\aln at 192.168.1.171] - (FastBatchingCellReader) > loadAggregation (millis): 15 > [2010-06-30 16:26:51,897] [DEBUG] [/lrm230] > [OTIDO\aln at 192.168.1.171] - (ResultBase ) > RolapResult: FREE_MEMORY: 197383kb 63.82% > [2010-06-30 16:26:51,897] [DEBUG] [/lrm230] > [OTIDO\aln at 192.168.1.171] - (mdx ) 1: exec: 18 ms > > It reports that query returned 0 rows (if I understand it correctly). > But when I tried to execute the same SQL manually against my > database it returned one row. > > Could anybody help me with it? We didn't change schema definition > and database content, so it worked in 3.1.2. > Any hint why closure could stop working would be much appreciated... > > Thanks. > > Anton Nikitin > > > _______________________________________________ > 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/20100702/ee8cfc2d/attachment.html From cybernelly at gmail.com Fri Jul 2 13:41:25 2010 From: cybernelly at gmail.com (Anton Nikitin) Date: Fri, 02 Jul 2010 21:41:25 +0400 Subject: [Mondrian] ParentChild hierarchy in Mondrian 3.2 In-Reply-To: <4C2E1891.70608@gmail.com> References: <4C2B3D53.3000301@gmail.com> <4C2E1891.70608@gmail.com> Message-ID: <4C2E24C5.7020106@gmail.com> After some additional research I found that after switching from Oracle to Sybase DBMS everything started to work fine. So it seems that your guess about floating value could be correct. Oracle returns metadata about integer columns as java.sql.Types.NUMERIC (with appropriate precision and scale). It seems that somewhere Mondrian handles it incorrectly... Anton 02.07.2010 20:49, Anton Nikitin wrote: > I can't agree with you about nullParentValue attribute -- this one is > used to indicate which member is a root (real root, not the allmember). > Our hierarchy has a single root and it has "-1" in PARENTID column. > However, I removed it and tried to drill into AllMember -- no effect. > > I removed hideMemberIf -- no effect. > > ANCESTORID in Oracle DDL is defined as Integer, but probably returned > in JDBC metadata as NUMBER (one of these funny Oracle tricks). > I have checked SQL: no difference when typing "1000.0" or "1000". > > The first things which seems to be very surprising is why it logs that > query returns 0 rows, while it doesn't? > What is the logic around this output? Doesn't it simply return the > number of rows in ResultSet? > > Also I noticed a recent bug: http://jira.pentaho.com/browse/MONDRIAN-767 > Although it talks about virtual cubes, the description looks very > similar to my case... > > Thanks. > > Anton > > 01.07.2010 3:32, Julian Hyde wrote: >> The attributes hideMemberIf and nullParentValue are usually only used >> in ragged hierarchies. Do the problems go away if you remove them? >> I notice that it is joining to '... = 1000.0'. Is ANCESTORID an >> integer in the database? Does that query return different results if >> you change 1000.0 to 1000? >> Julian >> >> ------------------------------------------------------------------------ >> *From:* mondrian-bounces at pentaho.org >> [mailto:mondrian-bounces at pentaho.org] *On Behalf Of *Anton Nikitin >> *Sent:* Wednesday, June 30, 2010 5:49 AM >> *To:* mondrian at pentaho.org >> *Subject:* [Mondrian] ParentChild hierarchy in Mondrian 3.2 >> >> I am experiencing some difficulties after upgrading from 3.1.2 to >> 3.2.0 with parent-child hierarchy. >> >> I have a hierarchy defined as follows: >> >> >> > primaryKey="NODEID"> >>
>> >> > nameColumn="RISKGROUPNAME" >> parentColumn="PARENT" nullParentValue="-1" >> type="Numeric" uniqueMembers="true" >> levelType="Regular" hideMemberIf="Never"> >> >>
>> >> >> >> >> >> And with such definition it returns empty cells if MDX includes >> any member from this hierarchy other than AllMember. >> If I comment out closure definition it starts to work correctly. >> >> During analysis I found the following in Mondrian log: >> >> >> [2010-06-30 16:26:51,896] [DEBUG] (RolapUtil ) >> Segment.load: executing sql [select >> "RISKGROUPCLOSURE"."ANCESTORID" as "c0", >> sum("DAILYCFBYRISKGROUPHIERARCHY"."STRESSCFAMOUNTPLUS"+"DAILYCFBYRISKGROUPHIERARCHY"."STRESSCFAMOUNTMINUS") >> as "m0" from " >> RISKGROUPCLOSURE" "RISKGROUPCLOSURE", >> "DAILYCFBYRISKGROUPHIERARCHY" "DAILYCFBYRISKGROUPHIERARCHY" where >> "DAILYCFBYRISKGROUPHIERARCHY"."NODEID" = >> "RISKGROUPCLOSURE"."NODEID" and "RISKGROUPCLOSURE"."ANCESTORID" = >> 1000.0 group by "RISKGROUPCLOSURE"."ANCESTORID"], exec 15 ms >> >> [2010-06-30 16:26:51,896] [DEBUG] [/lrm230] >> [OTIDO\aln at 192.168.1.171] - (RolapUtil ) >> Segment.load: done executing sql [select >> "RISKGROUPCLOSURE"."ANCESTORID" as "c0", >> sum("DAILYCFBYRISKGROUPHIERARCHY"."STRESSCFAMOUNTPLUS"+"DAILYCFBYRISKGROUPHIERARCHY"."STRESSCFAMOUNTMINUS") >> as "m0" from "RISKGROUPCLOSURE" "RISKGROUPCLOSURE", >> "DAILYCFBYRISKGROUPHIERARCHY" "DAILYCFBYRISKGROUPHIERARCHY" where >> "DAILYCFBYRISKGROUPHIERARCHY"."NODEID" = >> "RISKGROUPCLOSURE"."NODEID" and "RISKGROUPCLOSURE"."ANCESTORID" = >> 1000.0 group by "RISKGROUPCLOSURE"."ANCESTORID"], *exec+fetch 15 >> ms, 0 rows* >> >> [2010-06-30 16:26:51,896] [DEBUG] [/lrm230] >> [OTIDO\aln at 192.168.1.171] - (FastBatchingCellReader$Batch) >> Batch.loadAggregation (millis) 15 >> [2010-06-30 16:26:51,896] [DEBUG] [/lrm230] >> [OTIDO\aln at 192.168.1.171] - (FastBatchingCellReader) >> loadAggregation (millis): 15 >> [2010-06-30 16:26:51,897] [DEBUG] [/lrm230] >> [OTIDO\aln at 192.168.1.171] - (ResultBase ) >> RolapResult: FREE_MEMORY: 197383kb 63.82% >> [2010-06-30 16:26:51,897] [DEBUG] [/lrm230] >> [OTIDO\aln at 192.168.1.171] - (mdx ) 1: exec: 18 ms >> >> It reports that query returned 0 rows (if I understand it correctly). >> But when I tried to execute the same SQL manually against my >> database it returned one row. >> >> Could anybody help me with it? We didn't change schema definition >> and database content, so it worked in 3.1.2. >> Any hint why closure could stop working would be much appreciated... >> >> Thanks. >> >> Anton Nikitin >> >> >> _______________________________________________ >> 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/20100702/dc70f2f5/attachment.html From cybernelly at gmail.com Tue Jul 6 07:09:26 2010 From: cybernelly at gmail.com (Anton Nikitin) Date: Tue, 06 Jul 2010 15:09:26 +0400 Subject: [Mondrian] ParentChild hierarchy in Mondrian 3.2 In-Reply-To: <4C2E24C5.7020106@gmail.com> References: <4C2B3D53.3000301@gmail.com> <4C2E1891.70608@gmail.com> <4C2E24C5.7020106@gmail.com> Message-ID: <4C330EE6.50709@gmail.com> I have created a new issue: http://jira.pentaho.com/browse/MONDRIAN-769 Anton 02.07.2010 21:41, Anton Nikitin wrote: > After some additional research I found that after switching from > Oracle to Sybase DBMS everything started to work fine. > > So it seems that your guess about floating value could be correct. > > Oracle returns metadata about integer columns as > java.sql.Types.NUMERIC (with appropriate precision and scale). > It seems that somewhere Mondrian handles it incorrectly... > > Anton > > 02.07.2010 20:49, Anton Nikitin wrote: >> I can't agree with you about nullParentValue attribute -- this one is >> used to indicate which member is a root (real root, not the allmember). >> Our hierarchy has a single root and it has "-1" in PARENTID column. >> However, I removed it and tried to drill into AllMember -- no effect. >> >> I removed hideMemberIf -- no effect. >> >> ANCESTORID in Oracle DDL is defined as Integer, but probably returned >> in JDBC metadata as NUMBER (one of these funny Oracle tricks). >> I have checked SQL: no difference when typing "1000.0" or "1000". >> >> The first things which seems to be very surprising is why it logs >> that query returns 0 rows, while it doesn't? >> What is the logic around this output? Doesn't it simply return the >> number of rows in ResultSet? >> >> Also I noticed a recent bug: http://jira.pentaho.com/browse/MONDRIAN-767 >> Although it talks about virtual cubes, the description looks very >> similar to my case... >> >> Thanks. >> >> Anton >> >> 01.07.2010 3:32, Julian Hyde wrote: >>> The attributes hideMemberIf and nullParentValue are usually only >>> used in ragged hierarchies. Do the problems go away if you remove them? >>> I notice that it is joining to '... = 1000.0'. Is ANCESTORID an >>> integer in the database? Does that query return different results if >>> you change 1000.0 to 1000? >>> Julian >>> >>> ------------------------------------------------------------------------ >>> *From:* mondrian-bounces at pentaho.org >>> [mailto:mondrian-bounces at pentaho.org] *On Behalf Of *Anton Nikitin >>> *Sent:* Wednesday, June 30, 2010 5:49 AM >>> *To:* mondrian at pentaho.org >>> *Subject:* [Mondrian] ParentChild hierarchy in Mondrian 3.2 >>> >>> I am experiencing some difficulties after upgrading from 3.1.2 >>> to 3.2.0 with parent-child hierarchy. >>> >>> I have a hierarchy defined as follows: >>> >>> >>> >> primaryKey="NODEID"> >>>
>>> >>> >> nameColumn="RISKGROUPNAME" >>> parentColumn="PARENT" nullParentValue="-1" >>> type="Numeric" uniqueMembers="true" >>> levelType="Regular" hideMemberIf="Never"> >>> >>>
>>> >>> >>> >>> >>> >>> And with such definition it returns empty cells if MDX includes >>> any member from this hierarchy other than AllMember. >>> If I comment out closure definition it starts to work correctly. >>> >>> During analysis I found the following in Mondrian log: >>> >>> >>> [2010-06-30 16:26:51,896] [DEBUG] (RolapUtil ) >>> Segment.load: executing sql [select >>> "RISKGROUPCLOSURE"."ANCESTORID" as "c0", >>> sum("DAILYCFBYRISKGROUPHIERARCHY"."STRESSCFAMOUNTPLUS"+"DAILYCFBYRISKGROUPHIERARCHY"."STRESSCFAMOUNTMINUS") >>> as "m0" from " >>> RISKGROUPCLOSURE" "RISKGROUPCLOSURE", >>> "DAILYCFBYRISKGROUPHIERARCHY" "DAILYCFBYRISKGROUPHIERARCHY" >>> where "DAILYCFBYRISKGROUPHIERARCHY"."NODEID" = >>> "RISKGROUPCLOSURE"."NODEID" and "RISKGROUPCLOSURE"."ANCESTORID" >>> = 1000.0 group by "RISKGROUPCLOSURE"."ANCESTORID"], exec 15 ms >>> >>> [2010-06-30 16:26:51,896] [DEBUG] [/lrm230] >>> [OTIDO\aln at 192.168.1.171] - (RolapUtil ) >>> Segment.load: done executing sql [select >>> "RISKGROUPCLOSURE"."ANCESTORID" as "c0", >>> sum("DAILYCFBYRISKGROUPHIERARCHY"."STRESSCFAMOUNTPLUS"+"DAILYCFBYRISKGROUPHIERARCHY"."STRESSCFAMOUNTMINUS") >>> as "m0" from "RISKGROUPCLOSURE" "RISKGROUPCLOSURE", >>> "DAILYCFBYRISKGROUPHIERARCHY" "DAILYCFBYRISKGROUPHIERARCHY" >>> where "DAILYCFBYRISKGROUPHIERARCHY"."NODEID" = >>> "RISKGROUPCLOSURE"."NODEID" and "RISKGROUPCLOSURE"."ANCESTORID" >>> = 1000.0 group by "RISKGROUPCLOSURE"."ANCESTORID"], *exec+fetch >>> 15 ms, 0 rows* >>> >>> [2010-06-30 16:26:51,896] [DEBUG] [/lrm230] >>> [OTIDO\aln at 192.168.1.171] - (FastBatchingCellReader$Batch) >>> Batch.loadAggregation (millis) 15 >>> [2010-06-30 16:26:51,896] [DEBUG] [/lrm230] >>> [OTIDO\aln at 192.168.1.171] - (FastBatchingCellReader) >>> loadAggregation (millis): 15 >>> [2010-06-30 16:26:51,897] [DEBUG] [/lrm230] >>> [OTIDO\aln at 192.168.1.171] - (ResultBase ) >>> RolapResult: FREE_MEMORY: 197383kb 63.82% >>> [2010-06-30 16:26:51,897] [DEBUG] [/lrm230] >>> [OTIDO\aln at 192.168.1.171] - (mdx ) 1: exec: 18 ms >>> >>> It reports that query returned 0 rows (if I understand it >>> correctly). >>> But when I tried to execute the same SQL manually against my >>> database it returned one row. >>> >>> Could anybody help me with it? We didn't change schema >>> definition and database content, so it worked in 3.1.2. >>> Any hint why closure could stop working would be much appreciated... >>> >>> Thanks. >>> >>> Anton Nikitin >>> >>> >>> _______________________________________________ >>> 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/20100706/bc298884/attachment.html From feris+mondrian at phi-integration.com Tue Jul 6 14:17:53 2010 From: feris+mondrian at phi-integration.com (Feris Thia) Date: Wed, 7 Jul 2010 01:17:53 +0700 Subject: [Mondrian] Role on BI Server In-Reply-To: References: Message-ID: Hi Tom, I seem lost on this. Can help me to craft the .xaction ? I attached mine, It isnt't working. I put the file on BI Server 3.6. Thanks in advance ! Regards, Feris On Mon, Jun 28, 2010 at 2:30 PM, Tom Barber wrote: > Hi Feris, > > Yeah there is now BI Server to Mondrian server role mapping, > > http://jira.pentaho.com/browse/BISERVER-3891 > > If you look in pentahoObjects, the docs are exactly the same as this jira > :) > > Tom > -- Thanks & Best Regards, Feris Thia Business Intelligence Consultant PT. Putera Handal Indotama Phone : +6221-30119353 Fax : +6221-5513483 Mobile : +628176-474-525 http://www.phi-integration.com http://pentaho.phi-integration.com http://sqlserver-tips.phi-integration.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100707/ed7c00f4/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: testanalysiscube.xaction Type: application/octet-stream Size: 8435 bytes Desc: not available Url : http://lists.pentaho.org/pipermail/mondrian/attachments/20100707/ed7c00f4/attachment.obj From jhyde at pentaho.com Tue Jul 6 18:30:08 2010 From: jhyde at pentaho.com (Julian Hyde) Date: Tue, 6 Jul 2010 15:30:08 -0700 Subject: [Mondrian] ParentChild hierarchy in Mondrian 3.2 In-Reply-To: <4C330EE6.50709@gmail.com> References: <4C2B3D53.3000301@gmail.com><4C2E1891.70608@gmail.com> <4C2E24C5.7020106@gmail.com> <4C330EE6.50709@gmail.com> Message-ID: <62CB11F69A914CD2AD977F70D3DA456B@mackerel> I'm pretty sure I have found the 2 issues at play in that bug. One issue I have fixed, and for the other there is a workaround which involves changing the column types in your schema. See the bug for more details. Julian _____ From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On Behalf Of Anton Nikitin Sent: Tuesday, July 06, 2010 4:09 AM To: Mondrian developer mailing list Subject: Re: [Mondrian] ParentChild hierarchy in Mondrian 3.2 I have created a new issue: http://jira.pentaho.com/browse/MONDRIAN-769 Anton -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100706/40b689f9/attachment.html From ishu123 at gmail.com Fri Jul 9 06:49:45 2010 From: ishu123 at gmail.com (ishwarya rajagopal) Date: Fri, 9 Jul 2010 16:19:45 +0530 Subject: [Mondrian] wekascoring mechanism Message-ID: People , Can anyone direct me as to where i have to look out to find how the wekascoring scores a row for a decision tree. I don want the code, i want to know the mechanism or method. Thanks, Iswarya -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100709/c10e8dd8/attachment.html From rand.jc at gmail.com Fri Jul 9 16:05:43 2010 From: rand.jc at gmail.com (Jonathan Rand) Date: Fri, 9 Jul 2010 16:05:43 -0400 Subject: [Mondrian] DataSourceChangeListener question regarding concurrent queries Message-ID: It isn't clear to me what DataSourceChangeListener.isHierarchyChanged should return when there are multiple queries executing concurrently. Consider the following timeline: 1. query 1 starts and calls isHierarchyChanged(x); the return value of this initial call shouldn't matter, because the cache should be empty 2. hierarchy x is modified 3. query 2 starts and calls isHierarchyChanged(x), which returns true due to modification of x 4. query 1 calls isHierarchyChanged(x) again, which returns... what? Should the call to isHierarchyChanged(x) on line 4 above return true because hierarchy x has changed since query 1 last called isHierarchyChanged(x), or should it return false because hierarchy x has not changed since the most recent call to isHierarchyChanged(x), even though that was in the context of a different query? Jon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100709/f97c9bc8/attachment.html From jhyde at pentaho.com Fri Jul 9 16:48:07 2010 From: jhyde at pentaho.com (Julian Hyde) Date: Fri, 9 Jul 2010 13:48:07 -0700 Subject: [Mondrian] DataSourceChangeListener question regarding concurrentqueries In-Reply-To: References: Message-ID: <6499E670681643B2B9726C482FA0F09D@mackerel> I think it just needs to return 'true' once. When that happens, the global cache will be flushed, so the latest will be seen by all queries. Julian _____ From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On Behalf Of Jonathan Rand Sent: Friday, July 09, 2010 1:06 PM To: Mondrian developer mailing list Subject: [Mondrian] DataSourceChangeListener question regarding concurrentqueries It isn't clear to me what DataSourceChangeListener.isHierarchyChanged should return when there are multiple queries executing concurrently. Consider the following timeline: 1. query 1 starts and calls isHierarchyChanged(x); the return value of this initial call shouldn't matter, because the cache should be empty 2. hierarchy x is modified 3. query 2 starts and calls isHierarchyChanged(x), which returns true due to modification of x 4. query 1 calls isHierarchyChanged(x) again, which returns... what? Should the call to isHierarchyChanged(x) on line 4 above return true because hierarchy x has changed since query 1 last called isHierarchyChanged(x), or should it return false because hierarchy x has not changed since the most recent call to isHierarchyChanged(x), even though that was in the context of a different query? Jon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100709/d00108d1/attachment.html From ati.rosselet at gmail.com Sun Jul 18 09:25:17 2010 From: ati.rosselet at gmail.com (Ati Rosselet) Date: Sun, 18 Jul 2010 15:25:17 +0200 Subject: [Mondrian] Fact Count problem. and WHERE/GROUP BY AggGen concern Message-ID: I have run into a problem with the default generated "Fact Count" measure (if no COUNT measure is in the cube schema). The problem is that the xmlMeasure has no column, and according to the code, that's fine (even a comment there), AggGen.java but the problem is that AggGen then dies horribly since we end up with a measure of "count(null)" and there is no "null" column. (count(*) would be nicer... :)) If I add in a hidded Fact Count measure, this problem goes away. I also seem to be having strange AggGen tables generated, missing WITH and GROUPBY sections... something like: 2010-07-18 14:33:43,848 INFO [STDOUT] insertIntoCollapsed: INSERT INTO agg_c_XXX_invoice_and_item ( amount, itemid, fact_count) SELECT sum("invoice_and_item"."amount") AS "amount", count("invoice_and_item"."itemid") AS "itemid", COUNT(*) AS "fact_count" FROM "invoice_and_item" "invoice_and_item", WHERE GROUP BY ; as far as I can see, the code ALWAYS generated the WHERE and GROUP BY code, even if there is nothing to generate. I would think that that whole section should be wrapped in an if statement: if (!collapsedColumnUsages.isEmpty()) { pw.println(); pw.println("WHERE "); .... pw.println(); pw.println("GROUP BY "); .... } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100718/bbf5a0f2/attachment.html From waw at 1783.com Mon Jul 19 18:58:30 2010 From: waw at 1783.com (waw at 1783.com) Date: Mon, 19 Jul 2010 22:58:30 +0000 Subject: [Mondrian] PRD Parameters for Mondrian Query Message-ID: I have looked through the forums, KB and other online resources but cannot find a means to allow for a dynamic set of column members. I have a multi value parameter in PRD with the following MDX. WITH SET [Client Location].[Clients].[SelectedClient] AS StrToSet(Parameter("SetofClients", String, "([Client Location].[Clients].[CLIENT1], [Client Location].[Clients].[CLIENT2], [Client Location].[Clients].[CLIENT3], [Client Location].[Clients].[CLIENT4])"))})' select [Client Location].[Clients].[SelectedClient] ON COLUMNS, NON EMPTY Crossjoin(Hierarchize({[Monthly Period].[2010]}), {[Measures].[Count of Employees], [Measures].[Count of Declined], [Measures].[Count No Record], [Measures].[Count Requested But No Vaccination Record], [Measures].[Count Vaccinated], [Measures].[Count Vaccinated Elsewhere], [Measures].[% Vaccinated], [Measures].[% Declined], [Measures].[% No Record]}) ON ROWS from [Monthly Influenza Summary] I am not sure what is going on, but I get no results. I can select "CLIENT1" or any combination without anything being displayed. The report query seems to be correct as I get the green dot in PRD, so I am not sure what is happening. Is there anyway to see what is being generated? Any ideas? I really do not like listing set in the StrToSet function as I do not want to hardcode the clients in the hierarchy list. BR/Bill W. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100719/7d3e4945/attachment.html From jhyde at pentaho.com Mon Jul 19 19:38:52 2010 From: jhyde at pentaho.com (Julian Hyde) Date: Mon, 19 Jul 2010 16:38:52 -0700 Subject: [Mondrian] PRD Parameters for Mondrian Query In-Reply-To: References: Message-ID: <2E27EBA877FB407DA426030EABC6F383@mackerel> Sounds like the fix to http://jira.pentaho.com/browse/MONDRIAN-725 will help you. Julian _____ From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On Behalf Of waw at 1783.com Sent: Monday, July 19, 2010 3:59 PM To: mondrian at pentaho.org Subject: [Mondrian] PRD Parameters for Mondrian Query I have looked through the forums, KB and other online resources but cannot find a means to allow for a dynamic set of column members. I have a multi value parameter in PRD with the following MDX. WITH SET [Client Location].[Clients].[SelectedClient] AS StrToSet(Parameter("SetofClients", String, "([Client Location].[Clients].[CLIENT1], [Client Location].[Clients].[CLIENT2], [Client Location].[Clients].[CLIENT3], [Client Location].[Clients].[CLIENT4])"))})' select [Client Location].[Clients].[SelectedClient] ON COLUMNS, NON EMPTY Crossjoin(Hierarchize({[Monthly Period].[2010]}), {[Measures].[Count of Employees], [Measures].[Count of Declined], [Measures].[Count No Record], [Measures].[Count Requested But No Vaccination Record], [Measures].[Count Vaccinated], [Measures].[Count Vaccinated Elsewhere], [Measures].[% Vaccinated], [Measures].[% Declined], [Measures].[% No Record]}) ON ROWS from [Monthly Influenza Summary] I am not sure what is going on, but I get no results. I can select "CLIENT1" or any combination without anything being displayed. The report query seems to be correct as I get the green dot in PRD, so I am not sure what is happening. Is there anyway to see what is being generated? Any ideas? I really do not like listing set in the StrToSet function as I do not want to hardcode the clients in the hierarchy list. BR/Bill W. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100719/b8c23991/attachment.html From waw at 1783.com Mon Jul 19 22:28:33 2010 From: waw at 1783.com (waw at 1783.com) Date: Tue, 20 Jul 2010 02:28:33 +0000 Subject: [Mondrian] PRD Parameters for Mondrian Query Message-ID: Does this mean that no Parameter() expressions will work until 3.2 or only a limited set of functionality? I am using 3.6GA platform release of EE. It looks like this is 3.1 Mondrian. I can get around the listing of members with the following: select strToMember(Parameter("SetofClients", STRING, "[Client Locations].[Clients].[All Clients]"))) on COLUMNS, NON EMPTY Crossjoin(Hierarchize({[Monthly Period].[2010]}), {[Measures].[Count of Employees], [Measures].[Count of Declined], [Measures].[Count No Record], [Measures].[Count Requested But No Vaccination Record], [Measures].[Count Vaccinated], [Measures].[Count Vaccinated Elsewhere], [Measures].[% Vaccinated], [Measures].[% Declined], [Measures].[% No Record]}) ON ROWS from [Monthly Influenza Summary] But this is not working either. I may very well be using the strToMember and Parameter functions incorrectly. BR/Bill W. -----Original Message----- From: Julian Hyde [mailto:jhyde at pentaho.com] Sent: Monday, July 19, 2010 07:38 PM To: ''Mondrian developer mailing list'' Subject: RE: [Mondrian] PRD Parameters for Mondrian Query Sounds like the fix to http://jira.pentaho.com/browse/MONDRIAN-725 will help you. Julian ------------------------------------------------------------ From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On Behalf Of waw at 1783.com Sent: Monday, July 19, 2010 3:59 PM To: mondrian at pentaho.org Subject: [Mondrian] PRD Parameters for Mondrian Query I have looked through the forums, KB and other online resources but cannot find a means to allow for a dynamic set of column members. I have a multi value parameter in PRD with the following MDX. WITH SET [Client Location].[Clients].[SelectedClient] AS StrToSet(Parameter("SetofClients", String, "([Client Location].[Clients].[CLIENT1], [Client Location].[Clients].[CLIENT2], [Client Location].[Clients].[CLIENT3], [Client Location].[Clients].[CLIENT4])"))})' select [Client Location].[Clients].[SelectedClient] ON COLUMNS, NON EMPTY Crossjoin(Hierarchize({[Monthly Period].[2010]}), {[Measures].[Count of Employees], [Measures].[Count of Declined], [Measures].[Count No Record], [Measures].[Count Requested But No Vaccination Record], [Measures].[Count Vaccinated], [Measures].[Count Vaccinated Elsewhere], [Measures].[% Vaccinated], [Measures].[% Declined], [Measures].[% No Record]}) ON ROWS from [Monthly Influenza Summary] I am not sure what is going on, but I get no results. I can select "CLIENT1" or any combination without anything being displayed. The report query seems to be correct as I get the green dot in PRD, so I am not sure what is happening. Is there anyway to see what is being generated? Any ideas? I really do not like listing set in the StrToSet function as I do not want to hardcode the clients in the hierarchy list. BR/Bill W. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100720/8b2f4440/attachment.html From waw at 1783.com Tue Jul 20 10:18:50 2010 From: waw at 1783.com (waw at 1783.com) Date: Tue, 20 Jul 2010 14:18:50 +0000 Subject: [Mondrian] Parameterized Mondrian Queries in PRD Message-ID: After looking through Julian's Jira note and looking through MDX notes a bit more, I am wondering if the Parameter function is working in PRD. I have created a parameter query that creates a member string : {[Client Location].[Clients].[CLIENT1]}. The string is part of the PRD MDX Query like the following select strToMember(Parameter("SetofClients", STRING, "[Client Location].[Clients].[All Clients]"))) ON COLUMNS, Crossjoin(Hierarchize({[Monthly Period].[2010]}), {[Measures].[Count of Employees], [Measures].[Count of Declined], [Measures].[Count No Record], [Measures].[Count Requested But No Vaccination Record], [Measures].[Count Vaccinated], [Measures].[Count Vaccinated Elsewhere], [Measures].[% Vaccinated], [Measures].[% Declined], [Measures].[% No Record]}) ON ROWS from [Monthly Influenza Summary] The query works fine when not parameterized. So, looking at Jira and the forums, I am wondering if I am chasing ghosts. The Advanced OLAP option in PRD is not well documented, so I am not sure how to build a completely dynamic MDX query in PRD. Any thoughts or direction is greatly appreciated. BR/Bill W. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100720/ef4081a0/attachment.html From mondrian at sherito.org Wed Jul 21 05:53:12 2010 From: mondrian at sherito.org (Thomas Morgner) Date: Wed, 21 Jul 2010 10:53:12 +0100 Subject: [Mondrian] Parameterized Mondrian Queries in PRD In-Reply-To: References: Message-ID: <4C46C388.8000400@sherito.org> String parameters are passed into Mondrian without any postprocessing by the reporting engine (if the parameter is a java.lang.String, otherwise we will throw a very visible exception). You are using a StrToMember which probably does not like the "{..}" syntax of the sets. Try a StrToSet instead, if you intend to pass a set. You can also skip the parameter function and use the classical ${...} parametrization syntax (PRD 3.6 or newer), which performs a simple replacement on the MDX string. To prevent code injections you can specify a subformat along with those parameters: ${param} will include the parameter without any modification. ${param,string} will quote the parameter value as MDX string (slap double quotes around it and escape all inner double quote chars) ${param,formattype,formatstyle} will treat the parameter as a message format request, so that you can format numbers, dates and so on properly. For the grammar of formattype and formatstyle have a look at http://download.oracle.com/docs/cd/E17476_01/javase/1.4.2/docs/api/java/text/MessageFormat.html On 20.07.10 15:18, waw at 1783.com wrote: > After looking through Julian's Jira note and looking through MDX notes a > bit more, I am wondering if the Parameter function is working in PRD. I > have created a parameter query that creates a member string : {[Client > Location].[Clients].[CLIENT1]}. The string is part of the PRD MDX Query > like the following > select strToMember(Parameter("SetofClients", STRING, "[Client > Location].[Clients].[All Clients]"))) ON COLUMNS, > Crossjoin(Hierarchize({[Monthly Period].[2010]}), {[Measures].[Count of > Employees], [Measures].[Count of Declined], [Measures].[Count No > Record], [Measures].[Count Requested But No Vaccination Record], > [Measures].[Count Vaccinated], [Measures].[Count Vaccinated Elsewhere], > [Measures].[% Vaccinated], [Measures].[% Declined], [Measures].[% No > Record]}) ON ROWS > from [Monthly Influenza Summary] > The query works fine when not parameterized. So, looking at Jira and the > forums, I am wondering if I am chasing ghosts. The Advanced OLAP option > in PRD is not well documented, so I am not sure how to build a > completely dynamic MDX query in PRD. Any thoughts or direction is > greatly appreciated. > BR/Bill W. > > > > _______________________________________________ > Mondrian mailing list > Mondrian at pentaho.org > http://lists.pentaho.org/mailman/listinfo/mondrian From waw at 1783.com Wed Jul 21 18:57:27 2010 From: waw at 1783.com (waw at 1783.com) Date: Wed, 21 Jul 2010 22:57:27 +0000 Subject: [Mondrian] Parameterized Mondrian Queries in PRD Message-ID: Thank you. That is what I needed! I have changed my query to: WITH SET [selectedset] AS ${CSVClient} select [selectedset] ON COLUMNS, {[Measures].[Count of Employees], [Measures].[Count of Declined], [Measures].[Count No Record], [Measures].[Count Requested But No Vaccination Record], [Measures].[Count Vaccinated], [Measures].[Count Vaccinated Elsewhere], [Measures].[% Vaccinated], [Measures].[% Declined], [Measures].[% No Record]} ON ROWS from [Monthly Influenza Summary] where ([Monthly Period].[${SelectedYear}]) I am using PRD parameters to get the set of customers in a multi-select, then I turn that set into a formatted array which I use in the query. The basics are there now. Now, I need to get PRD to create a dynamic set of columns for my report. I have seen someone using tables as a parameter, so I will get that part figured out. Bill W. -----Original Message----- From: Thomas Morgner [mailto:mondrian at sherito.org] Sent: Wednesday, July 21, 2010 05:53 AM To: 'Mondrian developer mailing list' Subject: Re: [Mondrian] Parameterized Mondrian Queries in PRD String parameters are passed into Mondrian without any postprocessing by the reporting engine (if the parameter is a java.lang.String, otherwise we will throw a very visible exception). You are using a StrToMember which probably does not like the "{..}" syntax of the sets. Try a StrToSet instead, if you intend to pass a set. You can also skip the parameter function and use the classical ${...} parametrization syntax (PRD 3.6 or newer), which performs a simple replacement on the MDX string. To prevent code injections you can specify a subformat along with those parameters: ${param} will include the parameter without any modification. ${param,string} will quote the parameter value as MDX string (slap double quotes around it and escape all inner double quote chars) ${param,formattype,formatstyle} will treat the parameter as a message format request, so that you can format numbers, dates and so on properly. For the grammar of formattype and formatstyle have a look at http://download.oracle.com/docs/cd/E17476_01/javase/1.4.2/docs/api/java/text/MessageFormat.html On 20.07.10 15:18, waw at 1783.com wrote: > After looking through Julian's Jira note and looking through MDX notes a > bit more, I am wondering if the Parameter function is working in PRD. I > have created a parameter query that creates a member string : {[Client > Location].[Clients].[CLIENT1]}. The string is part of the PRD MDX Query > like the following > select strToMember(Parameter("SetofClients", STRING, "[Client > Location].[Clients].[All Clients]"))) ON COLUMNS, > Crossjoin(Hierarchize({[Monthly Period].[2010]}), {[Measures].[Count of > Employees], [Measures].[Count of Declined], [Measures].[Count No > Record], [Measures].[Count Requested But No Vaccination Record], > [Measures].[Count Vaccinated], [Measures].[Count Vaccinated Elsewhere], > [Measures].[% Vaccinated], [Measures].[% Declined], [Measures].[% No > Record]}) ON ROWS > from [Monthly Influenza Summary] > The query works fine when not parameterized. So, looking at Jira and the > forums, I am wondering if I am chasing ghosts. The Advanced OLAP option > in PRD is not well documented, so I am not sure how to build a > completely dynamic MDX query in PRD. Any thoughts or direction is > greatly appreciated. > BR/Bill W. > > > > _______________________________________________ > 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 From ati.rosselet at gmail.com Wed Jul 21 19:39:15 2010 From: ati.rosselet at gmail.com (Ati Rosselet) Date: Thu, 22 Jul 2010 01:39:15 +0200 Subject: [Mondrian] problems.. Rollup of All, and with some hidden elements.. Message-ID: Problem solved - mainly Problem was caused by equals function of LimitedRollupMember memberGrantMap.get(m) failed if element in map was of type mondrian.rolap.RolapCubeMember and m was of type LimitedRollupMember. This means that get failed since equals was incorrect My new function (not perfect.. but mostly working ) : [code] public boolean equals(Object o) { if (o==null) return false; return ((o instanceof LimitedRollupMember && ((LimitedRollupMember) o).member.equals(member)) || (o instanceof RolapCubeMember && o.equals(member))); } [/code] also [image: Cool] *bug - if I'm correct* ------------------------------ mondrian.rolap.RolapImpl.java was Code: if (m==member)) { return Access.CUSTOM; } if (m!=grantedMember) && memberGrants.get(m)!= null) { break; } should be Code: if (m.equals(member)) { return Access.CUSTOM; } if (!m.equals(grantedMember) && memberGrants.get(m)!= null) { break; } This fixed a problem I was having w/o an ALL element - some of my elements kept disappearing. I debugged to see that the unique names were matching, but the == returned false(wrong), while .equals() was true (correct) Just my 2Cents worth .. still having the problem with partial not being handled by the ALL element though... [image: Edit/Delete Message] [image: Reply With Quote] [image: Multi-Quote This Message] [image: Quick reply to this message] -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100722/001b6ed3/attachment.html From diethard.steiner at gmail.com Thu Jul 22 04:26:10 2010 From: diethard.steiner at gmail.com (Diethard Steiner) Date: Thu, 22 Jul 2010 09:26:10 +0100 Subject: [Mondrian] Parameterized Mondrian Queries in PRD In-Reply-To: References: Message-ID: Hi Will, I was following this thread with great interest. I'd appreciate if you could share your solution on how to create a dynamic set of columns for your report in PDR. I also added your example to my PRD parameter guide/reference ( http://diethardsteiner.blogspot.com/2009/11/using-parameters-in-pentaho-report.html) as I think it will be useful for other users too (I hope this is fine with you). Best regards, Diethard On Wed, Jul 21, 2010 at 11:57 PM, wrote: > Thank you. That is what I needed! > > I have changed my query to: > > WITH SET [selectedset] AS ${CSVClient} > select [selectedset] ON COLUMNS, > {[Measures].[Count of Employees], [Measures].[Count of Declined], > [Measures].[Count No Record], [Measures].[Count Requested But No Vaccination > Record], [Measures].[Count Vaccinated], [Measures].[Count Vaccinated > Elsewhere], [Measures].[% Vaccinated], [Measures].[% Declined], > [Measures].[% No Record]} ON ROWS > from [Monthly Influenza Summary] > where ([Monthly Period].[${SelectedYear}]) > > I am using PRD parameters to get the set of customers in a multi-select, > then I turn that set into a formatted array which I use in the query. The > basics are there now. Now, I need to get PRD to create a dynamic set of > columns for my report. I have seen someone using tables as a parameter, so I > will get that part figured out. > > > Bill W. > -----Original Message----- > From: Thomas Morgner [mailto:mondrian at sherito.org] > Sent: Wednesday, July 21, 2010 05:53 AM > To: 'Mondrian developer mailing list' > Subject: Re: [Mondrian] Parameterized Mondrian Queries in PRD > > String parameters are passed into Mondrian without any postprocessing by > the reporting engine (if the parameter is a java.lang.String, otherwise we > will throw a very visible exception). You are using a StrToMember which > probably does not like the "{..}" syntax of the sets. Try a StrToSet > instead, if you intend to pass a set. You can also skip the parameter > function and use the classical ${...} parametrization syntax (PRD 3.6 or > newer), which performs a simple replacement on the MDX string. To prevent > code injections you can specify a subformat along with those parameters: > ${param} will include the parameter without any modification. > ${param,string} will quote the parameter value as MDX string (slap double > quotes around it and escape all inner double quote chars) > ${param,formattype,formatstyle} will treat the parameter as a message format > request, so that you can format numbers, dates and so on properly. For the > grammar of formattype and formatstyle have a look at > http://download.oracle.com/docs/cd/E17476_01/javase/1.4.2/docs/api/java/text/MessageFormat.htmlOn 20.07.10 15:18, > waw at 1783.com wrote: > After looking through Julian's Jira note and looking > through MDX notes a > bit more, I am wondering if the Parameter function is > working in PRD. I > have created a parameter query that creates a member > string : {[Client > Location].[Clients].[CLIENT1]}. The string is part of > the PRD MDX Query > like the following > select > strToMember(Parameter("SetofClients", STRING, "[Client > > Location].[Clients].[All Clients]"))) ON COLUMNS, > > Crossjoin(Hierarchize({[Monthly Period].[2010]}), {[Measures].[Count of > > Employees], [Measures].[Count of Declined], [Measures].[Count No > Record], > [Measures].[Count Requested But No Vaccination Record], > [Measures].[Count > Vaccinated], [Measures].[Count Vaccinated Elsewhere], > [Measures].[% > Vaccinated], [Measures].[% Declined], [Measures].[% No > Record]}) ON ROWS > > from [Monthly Influenza Summary] > The query works fine when not > parameterized. So, looking at Jira and the > forums, I am wondering if I am > chasing ghosts. The Advanced OLAP option > in PRD is not well documented, so > I am not sure how to build a > completely dynamic MDX query in PRD. Any > thoughts or direction is > greatly appreciated. > BR/Bill W. > > > > > _______________________________________________ > 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 > > > _______________________________________________ > 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/20100722/542faaf1/attachment.html From waw at 1783.com Thu Jul 22 07:46:14 2010 From: waw at 1783.com (Bill Wimsatt) Date: Thu, 22 Jul 2010 05:46:14 -0600 Subject: [Mondrian] Parameterized Mondrian Queries in PRD In-Reply-To: References: Message-ID: I sure will. I will create a version that uses the SampleData so that anyone can follow it. Best Regards Bill Wimsatt 1783 Productions, LLC 720 318 5550 (c) On Jul 22, 2010, at 2:26 AM, Diethard Steiner wrote: > Hi Will, > I was following this thread with great interest. I'd appreciate if you could share your solution on how to create a dynamic set of columns for your report in PDR. > > I also added your example to my PRD parameter guide/reference (http://diethardsteiner.blogspot.com/2009/11/using-parameters-in-pentaho-report.html) as I think it will be useful for other users too (I hope this is fine with you). > > Best regards, > Diethard > > > On Wed, Jul 21, 2010 at 11:57 PM, wrote: > Thank you. That is what I needed! > > I have changed my query to: > > WITH SET [selectedset] AS ${CSVClient} > select [selectedset] ON COLUMNS, > {[Measures].[Count of Employees], [Measures].[Count of Declined], [Measures].[Count No Record], [Measures].[Count Requested But No Vaccination Record], [Measures].[Count Vaccinated], [Measures].[Count Vaccinated Elsewhere], [Measures].[% Vaccinated], [Measures].[% Declined], [Measures].[% No Record]} ON ROWS > from [Monthly Influenza Summary] > where ([Monthly Period].[${SelectedYear}]) > > I am using PRD parameters to get the set of customers in a multi-select, then I turn that set into a formatted array which I use in the query. The basics are there now. Now, I need to get PRD to create a dynamic set of columns for my report. I have seen someone using tables as a parameter, so I will get that part figured out. > > > Bill W. > -----Original Message----- > From: Thomas Morgner [mailto:mondrian at sherito.org] > Sent: Wednesday, July 21, 2010 05:53 AM > To: 'Mondrian developer mailing list' > Subject: Re: [Mondrian] Parameterized Mondrian Queries in PRD > > String parameters are passed into Mondrian without any postprocessing by the reporting engine (if the parameter is a java.lang.String, otherwise we will throw a very visible exception). You are using a StrToMember which probably does not like the "{..}" syntax of the sets. Try a StrToSet instead, if you intend to pass a set. You can also skip the parameter function and use the classical ${...} parametrization syntax (PRD 3.6 or newer), which performs a simple replacement on the MDX string. To prevent code injections you can specify a subformat along with those parameters: ${param} will include the parameter without any modification. ${param,string} will quote the parameter value as MDX string (slap double quotes around it and escape all inner double quote chars) ${param,formattype,formatstyle} will treat the parameter as a message format request, so that you can format numbers, dates and so on properly. For the grammar of formattype and formatstyle have a look at http://download.oracle.com/docs/cd/E17476_01/javase/1.4.2/docs/api/java/text/MessageFormat.html On 20.07.10 15:18, waw at 1783.com wrote: > After looking through Julian's Jira note and looking through MDX notes a > bit more, I am wondering if the Parameter function is working in PRD. I > have created a parameter query that creates a member string : {[Client > Location].[Clients].[CLIENT1]}. The string is part of the PRD MDX Query > like the following > select strToMember(Parameter("SetofClients", STRING, "[Client > Location].[Clients].[All Clients]"))) ON COLUMNS, > Crossjoin(Hierarchize({[Monthly Period].[2010]}), {[Measures].[Count of > Employees], [Measures].[Count of Declined], [Measures].[Count No > Record], [Measures].[Count Requested But No Vaccination Record], > [Measures].[Count Vaccinated], [Measures].[Count Vaccinated Elsewhere], > [Measures].[% Vaccinated], [Measures].[% Declined], [Measures].[% No > Record]}) ON ROWS > from [Monthly Influenza Summary] > The query works fine when not parameterized. So, looking at Jira and the > forums, I am wondering if I am chasing ghosts. The Advanced OLAP option > in PRD is not well documented, so I am not sure how to build a > completely dynamic MDX query in PRD. Any thoughts or direction is > greatly appreciated. > BR/Bill W. > > > > _______________________________________________ > 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 > > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100722/34a2d8b9/attachment.html From diethard.steiner at gmail.com Thu Jul 22 09:27:42 2010 From: diethard.steiner at gmail.com (Diethard Steiner) Date: Thu, 22 Jul 2010 14:27:42 +0100 Subject: [Mondrian] Parameterized Mondrian Queries in PRD In-Reply-To: References: Message-ID: Thanks a lot Bill! Much appreciated. Best regards, Diethard On Thu, Jul 22, 2010 at 12:46 PM, Bill Wimsatt wrote: > I sure will. I will create a version that uses the SampleData so that > anyone can follow it. > > > Best Regards > Bill Wimsatt > 1783 Productions, LLC > 720 318 5550 (c) > > > > > > On Jul 22, 2010, at 2:26 AM, Diethard Steiner wrote: > > Hi Will, > I was following this thread with great interest. I'd appreciate if you > could share your solution on how to create a dynamic set of columns for > your report in PDR. > > I also added your example to my PRD parameter guide/reference ( > http://diethardsteiner.blogspot.com/2009/11/using-parameters-in-pentaho-report.html) > as I think it will be useful for other users too (I hope this is fine with > you). > > Best regards, > Diethard > > > On Wed, Jul 21, 2010 at 11:57 PM, wrote: > >> Thank you. That is what I needed! >> >> I have changed my query to: >> >> WITH SET [selectedset] AS ${CSVClient} >> select [selectedset] ON COLUMNS, >> {[Measures].[Count of Employees], [Measures].[Count of Declined], >> [Measures].[Count No Record], [Measures].[Count Requested But No Vaccination >> Record], [Measures].[Count Vaccinated], [Measures].[Count Vaccinated >> Elsewhere], [Measures].[% Vaccinated], [Measures].[% Declined], >> [Measures].[% No Record]} ON ROWS >> from [Monthly Influenza Summary] >> where ([Monthly Period].[${SelectedYear}]) >> >> I am using PRD parameters to get the set of customers in a multi-select, >> then I turn that set into a formatted array which I use in the query. The >> basics are there now. Now, I need to get PRD to create a dynamic set of >> columns for my report. I have seen someone using tables as a parameter, so I >> will get that part figured out. >> >> >> Bill W. >> -----Original Message----- >> From: Thomas Morgner [mailto:mondrian at sherito.org] >> Sent: Wednesday, July 21, 2010 05:53 AM >> To: 'Mondrian developer mailing list' >> Subject: Re: [Mondrian] Parameterized Mondrian Queries in PRD >> >> String parameters are passed into Mondrian without any postprocessing by >> the reporting engine (if the parameter is a java.lang.String, otherwise we >> will throw a very visible exception). You are using a StrToMember which >> probably does not like the "{..}" syntax of the sets. Try a StrToSet >> instead, if you intend to pass a set. You can also skip the parameter >> function and use the classical ${...} parametrization syntax (PRD 3.6 or >> newer), which performs a simple replacement on the MDX string. To prevent >> code injections you can specify a subformat along with those parameters: >> ${param} will include the parameter without any modification. >> ${param,string} will quote the parameter value as MDX string (slap double >> quotes around it and escape all inner double quote chars) >> ${param,formattype,formatstyle} will treat the parameter as a message format >> request, so that you can format numbers, dates and so on properly. For the >> grammar of formattype and formatstyle have a look at >> http://download.oracle.com/docs/cd/E17476_01/javase/1.4.2/docs/api/java/text/MessageFormat.htmlOn 20.07.10 15:18, >> waw at 1783.com wrote: > After looking through Julian's Jira note and >> looking through MDX notes a > bit more, I am wondering if the Parameter >> function is working in PRD. I > have created a parameter query that creates >> a member string : {[Client > Location].[Clients].[CLIENT1]}. The string is >> part of the PRD MDX Query > like the following > select >> strToMember(Parameter("SetofClients", STRING, "[Client > >> Location].[Clients].[All Clients]"))) ON COLUMNS, > >> Crossjoin(Hierarchize({[Monthly Period].[2010]}), {[Measures].[Count of > >> Employees], [Measures].[Count of Declined], [Measures].[Count No > Record], >> [Measures].[Count Requested But No Vaccination Record], > [Measures].[Count >> Vaccinated], [Measures].[Count Vaccinated Elsewhere], > [Measures].[% >> Vaccinated], [Measures].[% Declined], [Measures].[% No > Record]}) ON ROWS > >> from [Monthly Influenza Summary] > The query works fine when not >> parameterized. So, looking at Jira and the > forums, I am wondering if I am >> chasing ghosts. The Advanced OLAP option > in PRD is not well documented, so >> I am not sure how to build a > completely dynamic MDX query in PRD. Any >> thoughts or direction is > greatly appreciated. > BR/Bill W. > > > > >> _______________________________________________ > 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 >> >> >> _______________________________________________ >> 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 > > > > _______________________________________________ > 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/20100722/c628c7bf/attachment.html From waw at 1783.com Thu Jul 22 12:14:31 2010 From: waw at 1783.com (waw at 1783.com) Date: Thu, 22 Jul 2010 16:14:31 +0000 Subject: [Mondrian] Parameterized Mondrian Queries in PRD Message-ID: Ok, see attached. This is more about PRD than Mondrian, but since I started in this group and others were interested, I am sending my initial solution. A couple of notes: 1) A query is used to get a list of distinct product lines: ListProductLines. select '[Product].[All Products].['||productline||']' as productmember from products group by productmember 2) A parameter multi-select is set up for pulling the query values: pProductLine The user can select one or more values to display 3) A final parameter variable is set for turning the selected values into an MDX query component: pProductArray The trick is the formula - ="{" & CSVTEXT([pProductLine];false(); ",") & "}" This formula comma separates the values and adds the curly braces required for MDX. This can probably be done in a single parameter, but I split it for illustration purposes. That's it. The next step is to provide a dynamic set of columns on the report itself. I am testing with indexed array variables in PRD. This may require some javascripting so that I can assure array members and not get outside the index value. This is nothing fancy at this time. I just needed to get the basics so that I can move onto the next portion, but it does serve as a very basic example of controlled ad hoc reporting with MDX. BR/Bill W. -----Original Message----- From: Diethard Steiner [mailto:diethard.steiner at gmail.com] Sent: Thursday, July 22, 2010 09:27 AM To: 'Mondrian developer mailing list' Subject: Re: [Mondrian] Parameterized Mondrian Queries in PRD Thanks a lot Bill! Much appreciated. Best regards, Diethard On Thu, Jul 22, 2010 at 12:46 PM, Bill Wimsatt wrote: I sure will. I will create a version that uses the SampleData so that anyone can follow it. Best Regards Bill Wimsatt 1783 Productions, LLC 720 318 5550 (c) On Jul 22, 2010, at 2:26 AM, Diethard Steiner wrote: Hi Will, I was following this thread with great interest. I'd appreciate if you could share your solution on how to create a dynamic set of columns for your report in PDR. I also added your example to my PRD parameter guide/reference (http://diethardsteiner.blogspot.com/2009/11/using-parameters-in-pentaho-report.html) as I think it will be useful for other users too (I hope this is fine with you). Best regards, Diethard On Wed, Jul 21, 2010 at 11:57 PM, wrote: Thank you. That is what I needed! I have changed my query to: WITH SET [selectedset] AS ${CSVClient} select [selectedset] ON COLUMNS, {[Measures].[Count of Employees], [Measures].[Count of Declined], [Measures].[Count No Record], [Measures].[Count Requested But No Vaccination Record], [Measures].[Count Vaccinated], [Measures].[Count Vaccinated Elsewhere], [Measures].[% Vaccinated], [Measures].[% Declined], [Measures].[% No Record]} ON ROWS from [Monthly Influenza Summary] where ([Monthly Period].[${SelectedYear}]) I am using PRD parameters to get the set of customers in a multi-select, then I turn that set into a formatted array which I use in the query. The basics are there now. Now, I need to get PRD to create a dynamic set of columns for my report. I have seen someone using tables as a parameter, so I will get that part figured out. Bill W. -----Original Message----- From: Thomas Morgner [mailto:mondrian at sherito.org] Sent: Wednesday, July 21, 2010 05:53 AM To: 'Mondrian developer mailing list' Subject: Re: [Mondrian] Parameterized Mondrian Queries in PRD String parameters are passed into Mondrian without any postprocessing by the reporting engine (if the parameter is a java.lang.String, otherwise we will throw a very visible exception). You are using a StrToMember which probably does not like the "{..}" syntax of the sets. Try a StrToSet instead, if you intend to pass a set. You can also skip the parameter function and use the classical ${...} parametrization syntax (PRD 3.6 or newer), which performs a simple replacement on the MDX string. To prevent code injections you can specify a subformat along with those parameters: ${param} will include the parameter without any modification. ${param,string} will quote the parameter value as MDX string (slap double quotes around it and escape all inner double quote chars) ${param,formattype,formatstyle} will treat the parameter as a message format request, so that you can format numbers, dates and so on properly. For the grammar of formattype and formatstyle have a look at http://download.oracle.com/docs/cd/E17476_01/javase/1.4.2/docs/api/java/text/MessageFormat.html On 20.07.10 15:18, waw at 1783.com wrote: > After looking through Julian's Jira note and looking through MDX notes a > bit more, I am wondering if the Parameter function is working in PRD. I > have created a parameter query that creates a member string : {[Client > Location].[Clients].[CLIENT1]}. The string is part of the PRD MDX Query > like the following > select strToMember(Parameter("SetofClients", STRING, "[Client > Location].[Clients].[All Clients]"))) ON COLUMNS, > Crossjoin(Hierarchize({[Monthly Period].[2010]}), {[Measures].[Count of > Employees], [Measures].[Count of Declined], [Measures].[Count No > Record], [Measures].[Count Requested But No Vaccination Record], > [Measures].[Count Vaccinated], [Measures].[Count Vaccinated Elsewhere], > [Measures].[% Vaccinated], [Measures].[% Declined], [Measures].[% No > Record]}) ON ROWS > from [Monthly Influenza Summary] > The query works fine when not parameterized. So, looking at Jira and the > forums, I am wondering if I am chasing ghosts. The Advanced OLAP option > in PRD is not well documented, so I am not sure how to build a > completely dynamic MDX query in PRD. Any thoughts or direction is > greatly appreciated. > BR/Bill W. > > > > _______________________________________________ > Mondrian mailing list > Mondrian at pentaho.org > http://lists.pentaho.org/mailman/listinfo/mondrian _______________________________________________ Mondrian mailing list Mondrian at pentaho.orghttp://lists.pentaho.org/mailman/listinfo/mondrian _______________________________________________ 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 _______________________________________________ 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/20100722/d5f0cfab/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: TestSampleData.prpt Type: application/octet-stream Size: 5369 bytes Desc: not available Url : http://lists.pentaho.org/pipermail/mondrian/attachments/20100722/d5f0cfab/attachment.obj From jhyde at pentaho.com Thu Jul 22 21:09:28 2010 From: jhyde at pentaho.com (Julian Hyde) Date: Thu, 22 Jul 2010 18:09:28 -0700 Subject: [Mondrian] problems.. Rollup of All, and with some hidden elements.. In-Reply-To: References: Message-ID: <7798F9CBBD9D4D55BBDB0423DC06D08A@mackerel> Ati, Can you package this up as a contribution? If you could log a bug with a test case against foodmart we can do the rest. Or if another committer could check this in, with a test csae. I'm working hard turning the code upside down for mondrian-4.0 so I don't have the cycles to keep up with issues like this. Julian _____ From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On Behalf Of Ati Rosselet Sent: Wednesday, July 21, 2010 4:39 PM To: Mondrian developer mailing list Subject: [Mondrian] problems.. Rollup of All, and with some hidden elements.. Problem solved - mainly Problem was caused by equals function of LimitedRollupMember memberGrantMap.get(m) failed if element in map was of type mondrian.rolap.RolapCubeMember and m was of type LimitedRollupMember. This means that get failed since equals was incorrect My new function (not perfect.. but mostly working ) : [code] public boolean equals(Object o) { if (o==null) return false; return ((o instanceof LimitedRollupMember && ((LimitedRollupMember) o).member.equals(member)) || (o instanceof RolapCubeMember && o.equals(member))); } [/code] also Cool bug - if I'm correct _____ mondrian.rolap.RolapImpl.java was Code: if (m==member)) { return Access.CUSTOM; } if (m!=grantedMember) && memberGrants.get(m)!= null) { break; } should be Code: if (m.equals(member)) { return Access.CUSTOM; } if (!m.equals(grantedMember) && memberGrants.get(m)!= null) { break; } This fixed a problem I was having w/o an ALL element - some of my elements kept disappearing. I debugged to see that the unique names were matching, but the == returned false(wrong), while .equals() was true (correct) Just my 2Cents worth .. still having the problem with partial not being handled by the ALL element though... Edit/Delete Message Reply With Quote Multi-Quote This Message Quick reply to this message -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100722/0af46f4b/attachment.html From diethard.steiner at gmail.com Fri Jul 23 06:02:01 2010 From: diethard.steiner at gmail.com (Diethard Steiner) Date: Fri, 23 Jul 2010 11:02:01 +0100 Subject: [Mondrian] Parameterized Mondrian Queries in PRD In-Reply-To: References: Message-ID: Hi Bill, Thanks a lot! I had a look at it and adjusted it a bit as I have all my data on MySQL. Well done so far. The part that I was actually interested in was on how to hide the empty columns. I experimented a bit with your sample and tried to work with the visibility =NOT(ISEMPTYDATA()) on the data fields. The problem is that field still takes up space if it is invisible. My next step: I set the layout of the details band to "row" and deleted all x and y values of all fields. I thought that that the fields would be automatically left aligned if one has a height and width of 0. I used the formula =IF(ISEMPTYDATA();0;63) to set the width and a similar one for the height. But this didn't work either. So, I haven't found an easy way yet (and I really have to focus on some other work now). If you come up with a good solution, please share it. Thanks, Diethard On Thu, Jul 22, 2010 at 5:14 PM, wrote: > Ok, see attached. This is more about PRD than Mondrian, but since I started > in this group and others were interested, I am sending my initial solution. > > A couple of notes: > 1) A query is used to get a list of distinct product lines: > ListProductLines. > select '[Product].[All Products].['||productline||']' as productmember > from products > group by productmember > > 2) A parameter multi-select is set up for pulling the query values: > pProductLine > The user can select one or more values to display > > 3) A final parameter variable is set for turning the selected values into > an MDX query component: pProductArray > The trick is the formula - ="{" & CSVTEXT([pProductLine];false(); ",") & > "}" > > This formula comma separates the values and adds the curly braces required > for MDX. This can probably be done in a single parameter, but I split it for > illustration purposes. > > That's it. The next step is to provide a dynamic set of columns on the > report itself. I am testing with indexed array variables in PRD. This may > require some javascripting so that I can assure array members and not get > outside the index value. > > This is nothing fancy at this time. I just needed to get the basics so that > I can move onto the next portion, but it does serve as a very basic example > of controlled ad hoc reporting with MDX. > > BR/Bill W. > > -----Original Message----- > *From:* Diethard Steiner [mailto:diethard.steiner at gmail.com] > *Sent:* Thursday, July 22, 2010 09:27 AM > *To:* 'Mondrian developer mailing list' > *Subject:* Re: [Mondrian] Parameterized Mondrian Queries in PRD > > Thanks a lot Bill! Much appreciated. > Best regards, > Diethard > > On Thu, Jul 22, 2010 at 12:46 PM, Bill Wimsatt wrote: > >> I sure will. I will create a version that uses the SampleData so that >> anyone can follow it. >> >> >> Best Regards >> Bill Wimsatt >> 1783 Productions, LLC >> 720 318 5550 (c) >> >> >> >> >> >> On Jul 22, 2010, at 2:26 AM, Diethard Steiner wrote: >> >> Hi Will, >> I was following this thread with great interest. I'd appreciate if you >> could share your solution on how to create a dynamic set of columns for >> your report in PDR. >> >> I also added your example to my PRD parameter guide/reference ( >> http://diethardsteiner.blogspot.com/2009/11/using-parameters-in-pentaho-report.html) >> as I think it will be useful for other users too (I hope this is fine with >> you). >> >> Best regards, >> Diethard >> >> >> On Wed, Jul 21, 2010 at 11:57 PM, wrote: >> >>> Thank you. That is what I needed! >>> >>> I have changed my query to: >>> >>> WITH SET [selectedset] AS ${CSVClient} >>> select [selectedset] ON COLUMNS, >>> {[Measures].[Count of Employees], [Measures].[Count of Declined], >>> [Measures].[Count No Record], [Measures].[Count Requested But No Vaccination >>> Record], [Measures].[Count Vaccinated], [Measures].[Count Vaccinated >>> Elsewhere], [Measures].[% Vaccinated], [Measures].[% Declined], >>> [Measures].[% No Record]} ON ROWS >>> from [Monthly Influenza Summary] >>> where ([Monthly Period].[${SelectedYear}]) >>> >>> I am using PRD parameters to get the set of customers in a multi-select, >>> then I turn that set into a formatted array which I use in the query. The >>> basics are there now. Now, I need to get PRD to create a dynamic set of >>> columns for my report. I have seen someone using tables as a parameter, so I >>> will get that part figured out. >>> >>> >>> Bill W. >>> -----Original Message----- >>> From: Thomas Morgner [mailto:mondrian at sherito.org] >>> Sent: Wednesday, July 21, 2010 05:53 AM >>> To: 'Mondrian developer mailing list' >>> Subject: Re: [Mondrian] Parameterized Mondrian Queries in PRD >>> >>> String parameters are passed into Mondrian without any postprocessing by >>> the reporting engine (if the parameter is a java.lang.String, otherwise we >>> will throw a very visible exception). You are using a StrToMember which >>> probably does not like the "{..}" syntax of the sets. Try a StrToSet >>> instead, if you intend to pass a set. You can also skip the parameter >>> function and use the classical ${...} parametrization syntax (PRD 3.6 or >>> newer), which performs a simple replacement on the MDX string. To prevent >>> code injections you can specify a subformat along with those parameters: >>> ${param} will include the parameter without any modification. >>> ${param,string} will quote the parameter value as MDX string (slap double >>> quotes around it and escape all inner double quote chars) >>> ${param,formattype,formatstyle} will treat the parameter as a message format >>> request, so that you can format numbers, dates and so on properly. For the >>> grammar of formattype and formatstyle have a look at >>> http://download.oracle.com/docs/cd/E17476_01/javase/1.4.2/docs/api/java/text/MessageFormat.htmlOn 20.07.10 15:18, >>> waw at 1783.com wrote: > After looking through Julian's Jira note and >>> looking through MDX notes a > bit more, I am wondering if the Parameter >>> function is working in PRD. I > have created a parameter query that creates >>> a member string : {[Client > Location].[Clients].[CLIENT1]}. The string is >>> part of the PRD MDX Query > like the following > select >>> strToMember(Parameter("SetofClients", STRING, "[Client > >>> Location].[Clients].[All Clients]"))) ON COLUMNS, > >>> Crossjoin(Hierarchize({[Monthly Period].[2010]}), {[Measures].[Count of > >>> Employees], [Measures].[Count of Declined], [Measures].[Count No > Record], >>> [Measures].[Count Requested But No Vaccination Record], > [Measures].[Count >>> Vaccinated], [Measures].[Count Vaccinated Elsewhere], > [Measures].[% >>> Vaccinated], [Measures].[% Declined], [Measures].[% No > Record]}) ON ROWS > >>> from [Monthly Influenza Summary] > The query works fine when not >>> parameterized. So, looking at Jira and the > forums, I am wondering if I am >>> chasing ghosts. The Advanced OLAP option > in PRD is not well documented, so >>> I am not sure how to build a > completely dynamic MDX query in PRD. Any >>> thoughts or direction is > greatly appreciated. > BR/Bill W. > > > > >>> _______________________________________________ > 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 >>> >>> >>> _______________________________________________ >>> 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 >> >> >> >> _______________________________________________ >> 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100723/f45fc667/attachment.html From jcarvajal at parquesoft.com Fri Jul 23 08:27:19 2010 From: jcarvajal at parquesoft.com (John Carvajal) Date: Fri, 23 Jul 2010 07:27:19 -0500 Subject: [Mondrian] Mondrian and pgpool Message-ID: <002301cb2a62$65861a00$30924e00$@com> I've been working on an idea, our idea is to work with pgpool-II to improve the performance of some data access, basically what we need is to use the query_cache and the option to parallelize the querys. The idea sounds interesting to us because we may take full advantage of the current ROLAP and management about how to access the data. we install the pgpool and works well (there is a bug in the query_cache already correct with the help of a post), then we test from the interface and makes the cache without difficulty, but when I tried to work with Mondrian query_cache simply does not work. The theory that I have (supported some debug to pgpool) is when mondrian send the SQL statement, it would seem that is sent in a special way, maybe this comes in a transaction or an execute, but it makes the pgpool identified as a different query and process it differently and do not save the cache. if anyone has any idea about it or can guide us to see if we can configure the JDBC driver in some way to stop this from happening or if we need to do some additional configuration, please let us know. Thanks John Carvajal Arciniegas Gerente Innovacion y Desarrollo Grupo Empresarial BIT PBX: (57 2) 485 46 61 jcarvajal at grupobit.net www.grupobit.net -------------------------------------------------------------------------- "Este mensaje es confidencial, puede contener informaci?n privilegiada y no puede ser usado ni divulgado por personas distintas de su destinatario. Si obtiene esta transmisi?n por error, por favor destruya su contenido y avise al remitente. Est? prohibida su retenci?n, grabaci?n, utilizaci?n o divulgaci?n con cualquier prop?sito. Este mensaje ha sido sometido a programas antivirus. No obstante, PARQUESOFT no asume ninguna responsabilidad por eventuales da?os generados por el recibo y uso de este material, siendo responsabilidad del destinatario verificar con sus propios medios la existencia de virus u otros defectos. -- This message is confidential and may contain privileged information, it may not be used or disclosed by any person other than the individual to whom it is addressed. If obtained in error, please destroy the information received and contact the sender. Its retention, recording, use or distribution with any intention are prohibited. This message has been tested by antivirus software. Nonetheless, PARQUESOFT assumes no responsibility for damages caused by the receipt or use of the material, given that it is the responsibility of the addressee to verify by his own means the presence of a virus or any other harmful defect." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100723/5b6220cc/attachment.html From jhyde at pentaho.com Fri Jul 23 20:24:57 2010 From: jhyde at pentaho.com (Julian Hyde) Date: Fri, 23 Jul 2010 17:24:57 -0700 Subject: [Mondrian] Mondrian 4.0 and regression tests Message-ID: <29C8038F36424480A8509053A6586BFB@mackerel> I am currently working on mondrian-4.0 and am reworking a lot of mondrian's internals, particularly in how schemas are loaded and validated, and in the mapping of levels and measures onto star schemas. Usually when I am changing mondrian, if I see a piece of logic in the code, I will try to preserve that logic, and will rework it if necessary when internal APIs change. But I don't propose to do that for mondrian-4.0: the changes to the code are quite widespread, and besides, it's chance to clean out some of the cruft that has built up over the years. So... If you have contributed a feature or bug fix to mondrian over the past years or months, make sure that there is a test case checked in as part of mondrian's regression test suite. I will do my best to make sure that the test case stays working, even if the code underneath is all different. In mondrian-4.0 there will be changes to how schemas are structured. A few examples: 1. Virtual cubes will be obsolete, or more precisely, any cube can have multiple groups of measures, each group based on a separate fact table. 2. Linkages between snowflake tables, currently specified using the element, will be specified using new element that declares table usages, relationships, and derived columns for the whole schema. 3. The present XML grammar isn't very forgiving if you get things in the wrong order: if you define a before your s in a cube, mondrian currently ignores all calculated members. The new XML grammar will be more forgiving. I recently decided that the XML grammar is sufficiently different that I would create a new XML grammar. But I promised that mondrian would be backwards compatible, and I will stand by that. There will be a converter that will recognize an old-style schema, convert it to a new-style schema in memory, and then proceed to load the new-style schema. So, old-style schemas should continue to work. Mondrian-4.0 In a few weeks I will be ready to release the specification for the new-style schemas. I would appreciate review of the new schemas. Since it is a major change, mondrian-4.0 will have a long beta phase. During which time I could use your help testing both new features and backwards compatibility. Julian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100723/163bdd8f/attachment.html From lucboudreau at gmail.com Thu Jul 29 09:36:12 2010 From: lucboudreau at gmail.com (Luc Boudreau) Date: Thu, 29 Jul 2010 09:36:12 -0400 Subject: [Mondrian] International number formats Message-ID: Hello, I'm currently working on adding a nice feature to Mondrian; supporting different formatting for thousand separators for different countries. An easy example would be the Indian formatting for currency. A ten million dollars must be displayed as : $1,00,00,000.00 As you can see, the first 3 whole numbers are grouped, while the remaining digits are grouped by two. Mondrian code was applying a modulo of 3 to the position of the digits and didn't consider the actual position of the thousand separator in the format string you passed, thus making any such formatting impossible. I found a nice way to support this, but there are repercussions that I would like to discuss. First, the test suite has some measures in the Sales cube that have the format string "#,#". The old code would interpret this as "no decimals, and commas to split the thousands every 3 digits". In the new code, that would be interpreted as "no decimals, a separator every digit". In my opinion, the new code makes a much better job at interpreting that format string. Once you get down to really thinking about what #,# means, and you consider other formats like "#,###", it definitely makes sense. That "#,#" appears in: Some tests are coded to look for those format strings. mondrian.xmla.XmlaCognosTest.testCognosMDXSuiteHR_001() mondrian.xmla.XmlaCognosTest.testCognosMDXSuiteHR_002() I propose to change them to "#,###" and make my implementation of the format string the official one for Mondrian. Here are some examples of how I would like the format strings to be interpreted. The base number is 1234567.8. #,### 1,234,567 ######,##,##.00 123,45,67.80 #,# 1,2,3,4,5,6,7 ##,##,##,###.# 12,34,567.8 _____________________________ Luc Boudreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100729/33693bde/attachment.html From jhyde at pentaho.com Thu Jul 29 16:00:41 2010 From: jhyde at pentaho.com (Julian Hyde) Date: Thu, 29 Jul 2010 13:00:41 -0700 Subject: [Mondrian] International number formats In-Reply-To: References: Message-ID: We are caught between a rock and a hard place here. We want to provide this functionality for Indian users (without it, doing financial analysis is incredibly difficult -- imagine if you were a US accountant and the amount 12345678 USD was formatted as '$12,34,56,78' -- you'd be really confused), but we also need to be compatible with current standard MDX behavior, current Mondrian behavior, and SSAS behavior (which effectively defines standard MDX behavior). In SSAS 2005, and current Mondrian, format(1000000, "#,#") returns "1,000,000". We can't just change that. The impact to existing reports would be too great otherwise. (I acknowledge that the VB format function may do otherwise... see for example http://www.vbforums.com/showthread.php?t=548012 . But SSAS doesn't seem to implement it, and our first duty is to be faithful to SSAS behavior and Mondrian's current behavior. If SSAS isn't compatible with VB, that's a problem for Microsoft's developers!) I suggest that we use the following rule: we observe use the spacing of the the format string only if there are two or more commas. Therefore: * format(1234567, "#,#") should return "1,234,567", as today * format(1234567, "##,#") should return "1,234,567" * format(1234567, "#,##,###") should return "12,34,567" * format(1234567890, "#,##,###") should return "1,23,45,67,890" Lastly, I recommend that everyone building applications uses the named format strings such as "Currency", "General Number", "Fixed", "Standard", "Percent" rather than explicit strings like "#,##,###.00". The named formats will expand the appropriate format string for the locale, and your app is more easily localizable. Julian _____ From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On Behalf Of Luc Boudreau Sent: Thursday, July 29, 2010 6:36 AM To: Mondrian developer mailing list Subject: [Mondrian] International number formats Hello, I'm currently working on adding a nice feature to Mondrian; supporting different formatting for thousand separators for different countries. An easy example would be the Indian formatting for currency. A ten million dollars must be displayed as : $1,00,00,000.00 As you can see, the first 3 whole numbers are grouped, while the remaining digits are grouped by two. Mondrian code was applying a modulo of 3 to the position of the digits and didn't consider the actual position of the thousand separator in the format string you passed, thus making any such formatting impossible. I found a nice way to support this, but there are repercussions that I would like to discuss. First, the test suite has some measures in the Sales cube that have the format string "#,#". The old code would interpret this as "no decimals, and commas to split the thousands every 3 digits". In the new code, that would be interpreted as "no decimals, a separator every digit". In my opinion, the new code makes a much better job at interpreting that format string. Once you get down to really thinking about what #,# means, and you consider other formats like "#,###", it definitely makes sense. That "#,#" appears in: Some tests are coded to look for those format strings. mondrian.xmla.XmlaCognosTest .testCognosMDXSuiteHR_001() mondrian.xmla.XmlaCognosTest .testCognosMDXSuiteHR_002() I propose to change them to "#,###" and make my implementation of the format string the official one for Mondrian. Here are some examples of how I would like the format strings to be interpreted. The base number is 1234567.8. #,### 1,234,567 ######,##,##.00 123,45,67.80 #,# 1,2,3,4,5,6,7 ##,##,##,###.# 12,34,567.8 _____________________________ Luc Boudreau -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100729/cd4425f5/attachment.html From buildguy at pentaho.com Fri Jul 30 17:59:01 2010 From: buildguy at pentaho.com (buildguy at pentaho.com) Date: Fri, 30 Jul 2010 17:59:01 -0400 (EDT) Subject: [Mondrian] Hudson build became unstable: mondrian-3.2 #174 Message-ID: <992400759.3321280527141677.JavaMail.tomcat@ci> See From buildguy at pentaho.com Fri Jul 30 19:40:10 2010 From: buildguy at pentaho.com (buildguy at pentaho.com) Date: Fri, 30 Jul 2010 19:40:10 -0400 (EDT) Subject: [Mondrian] Hudson build is back to stable: mondrian-3.2 #175 In-Reply-To: <992400759.3321280527141677.JavaMail.tomcat@ci> References: <992400759.3321280527141677.JavaMail.tomcat@ci> Message-ID: <609702413.3331280533210211.JavaMail.tomcat@ci> See