<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18852"></HEAD>
<BODY>
<DIV><SPAN class=593355306-08122009><FONT color=#000080 size=2
face="Lucida Sans">Easiest thing would be to create a "SELECT ... WHERE" view in
the database and base Mondrian's dimension on that.</FONT></SPAN></DIV>
<DIV><SPAN class=593355306-08122009><FONT color=#000080 size=2
face="Lucida Sans"></FONT></SPAN> </DIV>
<DIV><SPAN class=593355306-08122009><FONT color=#000080 size=2
face="Lucida Sans">It is possible to base a dimension on a query, but Mondrian
doesn't parse the query, it just includes it as a subquery in the FROM clause.
Most databases are fine with that, but it's possible that your database would
pay a performance penalty.</FONT></SPAN></DIV>
<DIV><SPAN class=593355306-08122009><FONT color=#000080 size=2
face="Lucida Sans"></FONT></SPAN> </DIV>
<DIV><SPAN class=593355306-08122009><FONT color=#000080 size=2
face="Lucida Sans">The other option, which may or may not work, depending on
your model, is to add an extra level at the top of your dimension, whose
key is the column that you want to filter your dimension table on.
</FONT></SPAN></DIV>
<DIV><SPAN class=593355306-08122009><FONT color=#000080 size=2
face="Lucida Sans"></FONT></SPAN> </DIV>
<DIV><SPAN class=593355306-08122009><FONT color=#000080 size=2
face="Lucida Sans">Hope that helps.</FONT></SPAN></DIV>
<DIV><SPAN class=593355306-08122009><FONT color=#000080 size=2
face="Lucida Sans"></FONT></SPAN> </DIV>
<DIV><SPAN class=593355306-08122009><FONT color=#000080 size=2
face="Lucida Sans">Julian</FONT></SPAN></DIV><BR>
<BLOCKQUOTE
style="BORDER-LEFT: #000080 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> mondrian-bounces@pentaho.org
[mailto:mondrian-bounces@pentaho.org] <B>On Behalf Of
</B>Constant2k<BR><B>Sent:</B> Monday, December 07, 2009 1:56 PM<BR><B>To:</B>
mondrian@pentaho.org<BR><B>Subject:</B> [Mondrian] Restrict data being
accessed by mondrian via filters<BR></FONT><BR></DIV>
<DIV></DIV>
<TABLE border=0 cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD vAlign=top>Dear Mondrian experts,
<DIV><BR></DIV>
<DIV>I'm evaluating Mondrian with a the TPC-DS schama (scale = 100GB
.</DIV>
<DIV>largest table hold 400 millions of lines )</DIV>
<DIV><BR></DIV>
<DIV>Is is possible to restrict the scope of each dimension via a WHERE
clause?</DIV>
<DIV>Do I need to know how to code a "schema processor" to achive
this?</DIV>
<DIV><BR></DIV>
<DIV>Thanks and Regards,</DIV>
<DIV><BR></DIV>
<DIV>Constant2k</DIV></TD></TR></TBODY></TABLE></BLOCKQUOTE></BODY></HTML>