PDA

View Full Version : q: debug



janheise
11-22-2002, 03:47 AM
i'm trying to create some views for my own
test-data. i'd like to turn on some debug-info - i'm especially interested in the sql-statements. i'm using mondrian via the mdxservlet/adhoc-jsp with my own data model and while i'm trying to join two tables for a hierarchy, mondrian does not come back.
jan

janheise
11-22-2002, 03:51 AM
here some more info:
if i use the query, i get a message on the console that my query did not produce a result. the query runs fine on my db console. using <join> seems to hang mondrian.
<Dimension name="Store">
<Hierarchy hasAll="true" primaryKey="store_id" primaryKeyTable="store">
<Query>
<SQL dialect="generic">
SELECT kdnr, toplevel, intermediate
FROM "store", "store_hierarchy"
WHERE "store"."store_id" = "store_hierarchy"."store_id"
</SQL>
</Query>
<!--
<Level name="Handelskette" column="toplevel" uniqueMembers="true"/>
<Level name="Mittelding" column="intermediate" uniqueMembers="true"/>
<Level name="Name" column="kdnr" uniqueMembers="true"/>
<Join leftKey="store_id" rightKey="store_id" type="inner">
<Table name="store"/>
<Table name="store_hierarchy"/>
</Join>
<Level name="Handelskette" table="store_hierarchy" column="toplevel" uniqueMembers="true"/>
<Level name="Mittelding" table="store_hierarchy" column="intermediate" uniqueMembers="true"/>
<Level name="Name" table="store" column="kdnr" uniqueMembers="true"/>
-->
</Hierarchy>
</Dimension>

jhyde
11-22-2002, 05:15 AM
To turn on diagnostics including SQL tracing, set
mondrian.trace.level=1
in mondrian.properties and restart mondrian. (If you're using mondrian in a web server, this needs to be in the root directory of your web application.)
I'll try to reproduce your specific test-case later.

janheise
11-22-2002, 06:09 AM
i set mondrian.trace.level=1 (and verified) but no debug shows up...
jan

jhyde
11-23-2002, 01:40 PM
Regarding tracing, there was a bug: it was only enabling tracing when being run from JUnit. I fixed it. I also added an FAQ:
http://apoptosis.dyndns.org:8080/open/mondrian/doc/faq.html#Tracing