<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Haven't tried CsvDBTestCase yet, was hoping it was something I was doing wrong with inline tables. &nbsp;:) &nbsp;I'll give it a shot today.<div><br></div><div>Thanks,</div><div>Pat</div><div><br><div apple-content-edited="true">On 2012-03-21, at 8:24 PM, Julian Hyde wrote:</div><div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">There are a few places where an InlineTable cannot be used in place of a regular table. (Not that it shouldn't -- but it's never been implemented.) I can well believe that this is one of those.<div><br></div><div>Sorry! I know it would have made it easier to write the test. InlineTable support will be better in mondrian-4, by the way.<br><div><br></div><div>Did you try extending CsvDBTestCase? That allows you to create a table at the start of the test, and drop it at the end.<br><div><br></div><div>Julian</div><div>&nbsp;<br><div><div>On Mar 21, 2012, at 1:30 PM, Patrick Leckey wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Julian,<div><br></div><div>I am working with TestContext.create() as you suggested, and am trying to accomplish this with an inline table (since I need data not in the FoodMart SQL). &nbsp;It looks promising, but I the test is failing with the following error:</div><div><br></div><div><pre style="white-space: pre-wrap; word-wrap: break-word; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); ">Mondrian Error:Internal error: no table 'store_management' found in hierarchy [Store Managers.Manager]</pre><div><br></div></div><div>Which seems to be failing in HierarchyUsage.findJoinTable() (specifically the exception thrown at line 429). &nbsp;Are inline tables not able to be used this way?</div><div><br></div><div>I have defined the cube I am adding with TestContext.create() as follows:</div><div><br></div><div><div>&lt;Cube name="ClosureTest"&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;InlineTable alias="store_management"&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>&lt;ColumnDefs&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>&lt;ColumnDef name="store_id" type="Numeric"/&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>&lt;ColumnDef name="employee_id" type="Numeric"/&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>&lt;ColumnDef name="supervisor_id" type="Numeric"/&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>&lt;ColumnDef name="manager_rank" type="Numeric"/&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>&lt;/ColumnDefs&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>&lt;Rows&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>&lt;Row&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>&lt;Value column="store_id"&gt;2&lt;/Value&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>&lt;Value column="employee_id"&gt;29&lt;/Value&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>&lt;Value column="supervisor_id"&gt;22&lt;/Value&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>&lt;Value column="manager_rank"&gt;1&lt;/Value&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>&lt;/Row&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>&lt;Row&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>&lt;Value column="store_id"&gt;3&lt;/Value&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>&lt;Value column="employee_id"&gt;30&lt;/Value&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>&lt;Value column="supervisor_id"&gt;22&lt;/Value&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>&lt;Value column="manager_rank"&gt;2&lt;/Value&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>&lt;/Row&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>&lt;Row&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>&lt;Value column="store_id"&gt;4&lt;/Value&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>&lt;Value column="employee_id"&gt;15&lt;/Value&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>&lt;Value column="supervisor_id"&gt;5&lt;/Value&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>&lt;Value column="manager_rank"&gt;3&lt;/Value&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>&lt;/Row&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>&lt;Row&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>&lt;Value column="store_id"&gt;5&lt;/Value&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>&lt;Value column="employee_id"&gt;12&lt;/Value&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>&lt;Value column="supervisor_id"&gt;5&lt;/Value&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>&lt;Value column="manager_rank"&gt;4&lt;/Value&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>&lt;/Row&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>&lt;/Rows&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;/InlineTable&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div>&nbsp;&lt;Dimension name="Store Managers" foreignKey="store_id"&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;Hierarchy hasAll="true" allMemberName="All Managers"</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;primaryKey="store_id" primaryKeyTable="store_management"</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;name="Manager"&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;Table name="employee"/&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;Level name="Employee Id" type="Numeric" uniqueMembers="true"</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;column="employee_id" parentColumn="supervisor_id"</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nameColumn="full_name" nullParentValue="0"&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;Closure parentColumn="supervisor_id" childColumn="employee_id"&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;Table name="employee_closure"/&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/Closure&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/Level&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;/Hierarchy&gt;</div><div>&nbsp; &nbsp; &lt;/Dimension&gt;</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &lt;Measure name="Rank" column="manager_rank" aggregator="min" formatString="Standard"/&gt;</div><div>&lt;/Cube&gt;</div></div><div><br></div></div>_______________________________________________<br>Mondrian mailing list<br><a href="mailto:Mondrian@pentaho.org">Mondrian@pentaho.org</a><br><a href="http://lists.pentaho.org/mailman/listinfo/mondrian">http://lists.pentaho.org/mailman/listinfo/mondrian</a><br></blockquote></div><br></div></div></div></div>_______________________________________________<br>Mondrian mailing list<br><a href="mailto:Mondrian@pentaho.org">Mondrian@pentaho.org</a><br>http://lists.pentaho.org/mailman/listinfo/mondrian<br></blockquote></div><br></div></body></html>