[Mondrian] Trying to generate sql for aggregate queries with KeyExpression columns

m h sesquile at gmail.com
Sat Sep 27 11:07:27 EDT 2008


I'm running cmdrunner and getting the following error:

> SELECT {[Measures].[Margin], [Measures].[Units]} ON COLUMNS,
{[Product].members} ON ROWS
FROM [Sales_Cube]
WHERE [Time_Dim].[2008].[1]
? ? ? ? ;
0    [main] WARN  mondrian.rolap.aggmatcher.AggGen  - Adding Collapsed
Column: For fact table "week_sales_fact", could not get column name
for RolapStar.Column: Product (15): cast ("primaryupc" as varchar) ||
' ' || primaryupcdesc || ' ' || freeformsz
2    [main] ERROR mondrian.rolap.FastBatchingCellReader$Batch  - AggGen failed

It says the column name isn't defined....  But here's the relevant
part of the schema:

     <Level name="Product" column="product" uniqueMembers="false" >
	<KeyExpression>
	  <SQL dialect="postgres">
	    cast ("primaryupc" as varchar) || ' ' || primaryupcdesc || ' ' ||
freeformsz
	  </SQL>
	</KeyExpression>
	<Property name="Primary UPC" column="primaryupc" type="String" />
	<Property name="Primary UPC Desc" column="primaryupcdesc" type="String" />
     </Level>

I actually put column="product" in, because it was missing before and
I got the same error.

Any advice?  (Hoping it's not fire up eclipse.  But if that's the
quickest thing to do...)

cheers,

-matt




More information about the Mondrian mailing list