cube cannot see any dimensions

47 views
Skip to first unread message

gengstrand

unread,
Mar 11, 2012, 1:50:49 PM3/11/12
to PHI's Mondrian OLAP Group
I have no trouble getting the foodmart example to work but, when I
supply my own cube, jpivot can see the measures but not the
dimensions.

Here is the cube definition.

<?xml version="1.0"?>
<Schema name="opeye">

<Cube name="opeye" defaultMeasure="visit">
<Table name="fact"/>
<Measure name="follow" column="follow" aggregator="sum"/>
<Measure name="discuss" column="discuss" aggregator="sum"/>
<Measure name="visit" column="visit" aggregator="sum"/>
<Dimension name="Site" foreignKey="site_id">
<Hierarchy hasAll="true" primaryKey="site_id" allMemberName="All
Channels" defaultMember="All Channels">
<Table name="site"/>
<Level name="topic" column="topic" uniqueMembers="false"/>
<Level name="channel" column="channel" uniqueMembers="true"/>
</Hierarchy>
</Dimension>
<Dimension name="Opportunity" foreignKey="opportunity_id">
<Hierarchy hasAll="true" primaryKey="opportunity_id"
allMemberName="All Categories" defaultMember="All Categories">
<Table name="opportunity"/>
<Level name="category" column="category" uniqueMembers="true"/>
<Level name="title" column="title" uniqueMembers="false"/>
</Hierarchy>
</Dimension>
<Dimension name="Time" foreignKey="time_id" type="TimeDimension">
<Hierarchy hasAll="false" primaryKey="time_id"
defaultMember="[Time].[2012].[2].[28]">
<Table name="timeperiod"/>
<Level name="year" ordinalColumn="year" nameColumn="year"
type="Numeric" column="year" uniqueMembers="true"
levelType="TimeYears"/>
<Level name="month" ordinalColumn="month" nameColumn="month"
type="Numeric" column="month" uniqueMembers="false"
levelType="TimeMonths"/>
<Level name="day" ordinalColumn="day" nameColumn="day"
type="Numeric" column="day" uniqueMembers="false" levelType="TimeDays"/
>
</Hierarchy>
</Dimension>
</Cube>

</Schema>

Here is the db schema.

create table site (
site_id int not null primary key,
topic varchar(50) not null,
channel varchar(30) not null
);
create table opportunity (
opportunity_id int not null primary key,
title varchar(50) not null,
category varchar(30) not null
);
create table timeperiod (
time_id int not null primary key,
year int not null,
month int not null,
day int not null
);

create table fact (
follow int not null,
discuss int not null,
visit int not null,
site_id int not null,
opportunity_id int not null,
time_id int not null,
constraint fact_SITE foreign key (site_id) references
site(site_id),
constraint fact_opportunity foreign key (opportunity_id)
references opportunity(opportunity_id),
constraint fact_time foreign key (time_id) references
timeperiod(time_id)
);

This query works.

select {[Measures].[follow], [Measures].[discuss], [Measures].[visit]}
ON COLUMNS
from [opeye]

This query fails.

select {[Measures].[follow], [Measures].[discuss], [Measures].[visit]}
ON COLUMNS,
{[Site].[All Channels], [Opportunity].[All Categories]} on rows
from [opeye]

com.tonbeller.jpivot.mondrian.MondrianModel#setUserMdx: setUserMdx
failed Mondrian Error:MDX object '[Site].[All Channels]' not found in
cube 'opeye'
Reply all
Reply to author
Forward
0 new messages