<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6001.18023" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=518470516-30052008><FONT face=Verdana 
color=#000080 size=2>Mat, see comments inline.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=518470516-30052008><FONT face=Verdana 
color=#000080 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=518470516-30052008><FONT face=Verdana 
color=#000080 size=2>Cc mondrian developers. I'd like other people to extend the 
schema validation framework. The more validation we can get up front (as opposed 
to at run time as at present), the faster people can build mondrian 
applications.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=518470516-30052008><FONT face=Verdana 
color=#000080 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=518470516-30052008><FONT face=Verdana 
color=#000080 size=2>I know there's already a lot of validation code built into 
the workbench. I don't know how it's structured. Can someone who knows that code 
comment on whether it could be moved into core mondrian?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=518470516-30052008><FONT face=Verdana 
color=#000080 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=518470516-30052008><FONT face=Verdana 
color=#000080 size=2>Julian</FONT></SPAN></DIV><FONT face=Verdana color=#000080 
size=2></FONT><BR>
<BLOCKQUOTE 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> Mat Lowery [mailto:mlowery@pentaho.com] 
  <BR><B>Sent:</B> Friday, May 30, 2008 7:59 AM<BR><B>To:</B> Julian 
  Hyde<BR><B>Subject:</B> Validation of target database<BR></FONT><BR></DIV>
  <DIV></DIV><SPAN class=518470516-30052008><FONT face=Verdana color=#000080 
  size=2>&nbsp;<FONT face=Tahoma 
  color=#000000>[bug]</FONT>&nbsp;</FONT></SPAN>describes a feature that 
  validates a database schema against a Mondrian schema file.&nbsp; Before I 
  dive into writing code, I wanted to check with you to see if:<BR><BR>
  <UL>
    <LI>Can't this code live in Mondrian?&nbsp; This code seems independent of 
    any UI tool.&nbsp;<SPAN class=518470516-30052008><FONT face=Verdana 
    color=#000080 size=2>&nbsp;</FONT></SPAN></LI></UL></BLOCKQUOTE>
<DIV><SPAN class=518470516-30052008><FONT face=Verdana color=#000080 size=2>It's 
worth considering. But if the code is independent of mondrian also (I don't know 
whether this is the case) then it might be better being standalone code in 
surfboard. </FONT></SPAN></DIV>
<BLOCKQUOTE 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
  <UL>
    <LI>Is there existing validation code (primary keys, etc) that I can 
    use?&nbsp;<SPAN class=518470516-30052008><FONT face=Verdana color=#000080 
    size=2>&nbsp;</FONT></SPAN></LI></UL></BLOCKQUOTE>
<DIV><SPAN class=518470516-30052008><FONT face=Verdana color=#000080 size=2>Not 
much at present. I added a connection parameter 'Ignore=true'&nbsp;in change 
11058. The idea is for mondrian to generate warnings while loading the schema, 
but still carry on loading the schema. I added the method 
'RolapSchema.error(String,XmlLocation)' for this purpose.</FONT></SPAN></DIV>
<BLOCKQUOTE 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
  <UL>
    <LI>Would pointing a Mondrian schema against a database and firing it up be 
    a sufficient test?&nbsp; I mean, does Mondrian do any checks as part of 
    firing up?&nbsp;<SPAN class=518470516-30052008><FONT face=Verdana 
    color=#000080 size=2>&nbsp;</FONT></SPAN></LI></UL></BLOCKQUOTE>
<DIV><SPAN class=518470516-30052008><FONT face=Verdana color=#000080 size=2>The 
default mode&nbsp;is for mondrian to do minimal checks, and to abort if 
it&nbsp;hits a fatal error.</FONT>&nbsp;<FONT face=Verdana color=#000080 
size=2>We still want to preserve that behavior, so mondrian starts up fast in 
production environments. But now I've added the new API, you can start adding 
validation checks.</FONT></SPAN></DIV>
<DIV><SPAN class=518470516-30052008><FONT face=Verdana color=#000080 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=518470516-30052008><FONT face=Verdana color=#000080 size=2>You 
can add validation code to RolapSchema (or indeed to RolapCube) gated on the 
condition</FONT></SPAN></DIV>
<DIV><SPAN class=518470516-30052008><FONT face=Verdana color=#000080 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=518470516-30052008><FONT face=Verdana color=#000080 
size=2>"true".equals(<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
internalConnection.getProperty(<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
RolapConnectionProperties.Ignore.name()))</FONT></SPAN></DIV>
<DIV><SPAN class=518470516-30052008><FONT face=Verdana color=#000080 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=518470516-30052008><FONT face=Verdana color=#000080 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=518470516-30052008><FONT face=Verdana color=#000080 size=2>I am 
refactoring the code to separate logical and physical schemas. Try not to make 
major changes to RolapSchema and RolapCube in particular. Additions are OK. 
Reformatting code is definitely a no-no. </FONT></SPAN></DIV>
<DIV><SPAN class=518470516-30052008><FONT face=Verdana color=#000080 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=518470516-30052008><FONT face=Verdana color=#000080 
size=2>Julian</FONT></SPAN></DIV></BODY></HTML>