<br><font size=2 face="sans-serif">Thank you - I will generate a time dimension
in the database instead. Its not that flexible but will do.</font>
<br><font size=2 face="sans-serif"><br>
Andreas</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>&quot;Julian Hyde&quot;
&lt;jhyde@pentaho.com&gt;</b> </font>
<p><font size=1 face="sans-serif">08.04.2009 08:15</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Bitte antworten an<br>
&lt;jhyde@pentaho.com&gt;</font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">An</font></div>
<td><font size=1 face="sans-serif">&lt;Andreas_Voss@tonbeller.com&gt;,
&quot;'Mondrian developer mailing list'&quot; &lt;mondrian@pentaho.org&gt;</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Kopie</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Thema</font></div>
<td><font size=1 face="sans-serif">RE: Custom MemberReader?</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2 color=#000080 face="Lucida Sans">Custom member readers
never really got off the ground. The problem is that they both need to
drive and to constrain. By drive, I mean that the dimension knows a list
of its own values and can generate values; by constrain, I mean that constraints
on the dimension can constrain queries involving the dimension, such as
(but not limited to) generating constraints on SQL queries. In short, I
never figured out what the API should look like, and I never got any tests
running, so the feature never happened.</font>
<br><font size=3>&nbsp;</font>
<br><font size=2 color=#000080 face="Lucida Sans">Over the next year, I
want to move the system in the direction of algebraic optimization. Concepts
such as attributes and constraints have meaning when they interact with
other constructs via rules. Sounds a bit abstract, hope I'm making sense.</font>
<br><font size=3>&nbsp;</font>
<br><font size=2 color=#000080 face="Lucida Sans">The RolapCubeXyz wrapper
classes are intended to simplify sharing of hierarchies, members, and in
particular member caches. The idea is that the 'meat' is in the member,
which is sharable, and a RolapCubeMember is just a pair of pointers associating
a member with a particular cube. Problem is, we haven't finished the job
yet. We need to make RolapMember an interface, so that RolapCubeMember
doesn't need to inherit all of RolapMember's data members.</font>
<br><font size=3>&nbsp;</font>
<br><font size=2 color=#000080 face="Lucida Sans">I agree that it's a bit
haphazard how things get wrapped in RolapCubeXyz objects. I've thought
of making things clearer by making sure that RolapXyz and RolapCubeXyz
do NOT implement the same interfaces. In effect, we would be introducing
a layer of abstraction into the architecture. Or perhaps merging into an
existing layer - it's difficult to tell until we actually do it.</font>
<br><font size=3>&nbsp;</font>
<br><font size=2 color=#000080 face="Lucida Sans">The big thing happening
in this code is to introduce phyiscal schemas. This work is well underway,
lots of code changes, and I do not want to have to merge in other major
code changes until it is complete. One of the things happening is that
mondrian will be more attribute-oriented. Hierarchies will be a loose association
of attributes. So, I don't know what that will mean for member readers.</font>
<br><font size=3>&nbsp;</font>
<br><font size=2 color=#000080 face="Lucida Sans">in short: I would appreciate
some help to do all of this refactoring, but I can't imagine taking on
other major changes to the guts of mondrian right now.</font>
<br><font size=3>&nbsp;</font>
<br><font size=2 color=#000080 face="Lucida Sans">Julian</font>
<br>
<br>
<hr><font size=2 face="Tahoma"><b>From:</b> Andreas_Voss@tonbeller.com
[mailto:Andreas_Voss@tonbeller.com] <b><br>
Sent:</b> Tuesday, April 07, 2009 11:56 AM<b><br>
To:</b> jhyde@pentaho.com; Mondrian developer mailing list<b><br>
Subject:</b> Custom MemberReader?</font><font size=3><br>
</font>
<br><font size=2 face="sans-serif"><br>
Hi all,</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
I need to implement (and hopefully contribute) a custom MemberReader that
generates a time dimension using a calendar. The customer wants to see
all dates even if they do not appear in the database. The generated time
members must behave as if they came from the database, for example, if
such a generated member is in the slicer, its key must be part of the SQL
where-clause when the cells (Segments) are loaded.</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
So I sat the attribute memberReaderClass of the hierarchy in the schema
and wrote a class that implements MemberSource. But my class was not instantiated,
instead I got a NPE in RolapHierarchy.getUniqueTable() where the relation
member is null. I have not yet found the reason for this.</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
When browsing through the code I found another weird thing. The class RolapCubeSqlMemberSource
extends SqlMemberSource and is instantiated directly from (No)CacheRolapCubeHierarchyMemberReader
in RolapCubeHierarchy, without checking if a custom MemberReader exists.
This code seems to be quite new (not in version 2.2.x). I dont think I
understand how/why everything (RolapMember, RolapHierarchy etc) gets wrapped
by a corresponding RolapCubeXyz version.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
Also probably the native crossjoin code must be examined, if a custom member
reader is involved then the native code can not be used.</font><font size=3><br>
</font><font size=2 face="sans-serif"><br>
Currently I'm quite lost. Is a custom MemberReader the right way to implement
the requirement? Or is it a &nbsp;relict from long ago that won't work
any more? Are there other glitches in the code that could prevent it from
function? And I dont understand the RolapCubeXyz wrapping - should the
MemberSource wrap its members or are they wrapped later? Lots of questions
...</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
An example of a custom MemberReader would be great ;-) </font><font size=3><br>
</font><font size=2 face="sans-serif"><br>
Thanks for any hints,</font><font size=3> </font><font size=2 face="sans-serif"><br>
Andreas</font><font size=3> <br>
</font>
<p><font size=2><b>TONBELLER AG</b><br>
Werner-von-Siemens-Str. 2<br>
D-64625 Bensheim <br>
Germany</font>
<p><a href=http://www.tonbeller.com/ target=_blank><font size=2 color=blue><u>www.tonbeller.com</u></font></a><font size=2>
</font>
<p><font size=2>Register Court: District Court Darmstadt<br>
Registration: HRB 21474<br>
Managing Board: Rutger Hetzler (CEO), Sebastian Hetzler, Torsten Mayer<br>
Chairman of the Supervisory Board: Rüdiger Brand</font>
<p>
<hr noshade>
<p><font size=2>This message is for the designated recipient only and may
contain privileged, proprietary, or otherwise private information. If you
have received it in error, please notify the sender immediately and delete
the original. Any unauthorised copying or dissemination of this message
is strictly prohibited.</font>
<p><font size=2>Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und
vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die Weitergabe
dieser E-Mail ist nicht gestattet.</font>
<p>
<p>
<br><div style="font-family:sans-serif;font-size:10pt;">

<p><b>TONBELLER AG</b><br>

Werner-von-Siemens-Str. 2<br>

D-64625 Bensheim <br>

Germany</p>



<a href="http://www.tonbeller.com" target="_blank">www.tonbeller.com</a>



<p>Register Court: District Court Darmstadt<br>

Registration: HRB 21474<br>

Managing Board: Rutger Hetzler (CEO), Sebastian Hetzler, Torsten Mayer<br>

Chairman of the Supervisory Board: R&uuml;diger Brand</p>



<hr noshade="noshade" size="1" style="margin:20px 0px;">



<p>This message is for the designated recipient only and may contain

privileged,

proprietary, or otherwise private information. If you have received it

in error,

please notify the sender immediately and delete the original. Any

unauthorised copying or

dissemination of this message is strictly prohibited.</p>



<p>Diese E-Mail enth&auml;lt vertrauliche und/oder rechtlich

gesch&uuml;tzte Informationen.

Wenn Sie nicht der richtige Adressat sind oder diese E-Mail

irrt&uuml;mlich erhalten

haben, informieren Sie bitte sofort den Absender und vernichten Sie

diese E-Mail.

Das unerlaubte Kopieren sowie die Weitergabe dieser E-Mail ist nicht

gestattet.</p>



</div>
<br>