[Mondrian] Support for hierarchies in AggLevels

Pedro Alves pmgalves at gmail.com
Mon Dec 5 13:12:33 EST 2011



I give up. Don't know what's wrong.


As soon as I uncomment:

<AggLevel column="d_location_Continent" 
name="[Locations.Continents].[Continent]"/>

I get an error.


My dim is:

	<Dimension type="StandardDimension" highCardinality="false" 
name="Locations">
		<Hierarchy hasAll="true" allMemberName="All" primaryKey="d_location_tk">
			<Table name="opt_d_location">
			</Table>
			<Level name="Country" column="country_name" type="String" 
uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
			</Level>
			<Level name="Region" column="region_name" type="String" 
uniqueMembers="false" levelType="Regular" hideMemberIf="Never">
			</Level>
			<Level name="City" column="city_name" type="String" 
uniqueMembers="false" levelType="Regular" hideMemberIf="Never">
			</Level>
		</Hierarchy>
		<Hierarchy name="Continents" hasAll="true" allMemberName="All" 
primaryKey="d_location_tk">
			<Table name="opt_d_location">
			</Table>
			<Level name="Continent" column="continent_name" type="String" 
uniqueMembers="false" levelType="Regular" hideMemberIf="Never">
			</Level>
			<Level name="Country" column="country_name" type="String" 
uniqueMembers="false" levelType="Regular" hideMemberIf="Never">
			</Level>
			<Level name="Region" column="region_name" type="String" 
uniqueMembers="false" levelType="Regular" hideMemberIf="Never">
			</Level>
			<Level name="City" column="city_name" type="String" 
uniqueMembers="false" levelType="Regular" hideMemberIf="Never">
			</Level>
		</Hierarchy>
	</Dimension>



	<DimensionUsage source="Locations" name="Locations" 
foreignKey="d_location_tk" highCardinality="false">
	</DimensionUsage>



As soon as I try to run this, I get mondrian looking for this member:


]
2011-12-05 18:08:00,083 DEBUG [mondrian.rolap.RolapCube] 
RolapCube.lookupChild: name=Crashdata, childname=[Locations], 
status=hierUsage == shared returning elementname=Locations
2011-12-05 18:08:00,083 DEBUG [mondrian.rolap.RolapHierarchy] 
HierarchyBase.lookupChild: name=Locations, childname=[Country] returning 
elementname=Country
2011-12-05 18:08:00,083 DEBUG [mondrian.rolap.RolapDimension] 
DimensionBase.lookupChild: name=Locations, childname=[Country] returning 
elementname=Country
2011-12-05 18:08:00,083 DEBUG [mondrian.olap.Util] Util.lookupCompound: 
found child.name=Country, child.class=mondrian.rolap.RolapCubeLevel
2011-12-05 18:08:00,083 DEBUG [mondrian.olap.Util] Util.lookupCompound: 
parent.name=Crashdata, category=level, 
names=[Locations.Continents].[Continent]
2011-12-05 18:08:00,083 DEBUG [mondrian.rolap.RolapHierarchy] 
HierarchyBase.lookupChild: name=Measures, 
childname=[Locations.Continents] returning null
2011-12-05 18:08:00,083 DEBUG [mondrian.rolap.RolapDimension] 
DimensionBase.lookupChild: name=Measures, 
childname=[Locations.Continents] returning null
2011-12-05 18:08:00,083 DEBUG [mondrian.rolap.RolapSchemaReader] looking 
for child "[Locations.Continents]" of [Dates].[All]
2011-12-05 18:08:00,084 DEBUG [mondrian.rolap.RolapSchemaReader] 
NumberFormatException in lookupMemberChildByName for parent = 
"[Dates].[All]", childName="[Locations.Continents]", exception: For 
input string: "Locations.Continents"
2011-12-05 18:08:00,084 DEBUG [mondrian.rolap.RolapHierarchy] 
HierarchyBase.lookupChild: name=Dates, childname=[Locations.Continents] 
returning null
2011-12-05 18:08:00,084 DEBUG [mondrian.rolap.RolapDimension] 
DimensionBase.lookupChild: name=Dates, childname=[Locations.Continents] 
returning null
2011-12-05 18:08:00,084 DEBUG [mondrian.rolap.RolapSchemaReader] looking 
for child "[Locations.Continents]" of [Times].[All]
2011-12-05 18:08:00,084 DEBUG [mondrian.rolap.RolapSchemaReader] 
NumberFormatException in lookupMemberChildByName for parent = 
"[Times].[All]", childName="[Locations.Continents]", exception: For 
input string: "Locations.Continents"
2011-12-05 18:08:00,084 DEBUG [mondrian.rolap.RolapHierarchy] 
HierarchyBase.lookupChild: name=Times, childname=[Locations.Continents] 
returning null
2011-12-05 18:08:00,084 DEBUG [mondrian.rolap.RolapDimension] 
DimensionBase.lookupChild: name=Times, childname=[Locations.Continents] 
returning null
2011-12-05 18:08:00,084 DEBUG [mondrian.rolap.RolapSchemaReader] looking 
for child "[Locations.Continents]" of [Status].[All]
2011-12-05 18:08:00,651 DEBUG [mondrian.rolap.RolapUtil] 
SqlMemberSource.getMemberChildren: done executing sql [select
     "opt_d_status"."status" as "c0"
from
     "opt_d_status" as "opt_d_status"
where
     "opt_d_status"."status" = 'Locations.Continents'
group by
     "opt_d_status"."status"
order by
     "opt_d_status"."status" ASC
], exec+fetch 382 ms, 0 rows
2011-12-05 18:08:00,651 DEBUG [mondrian.rolap.RolapUtil] 
SqlMemberSource.getMemberChildren: executing sql [select
     "opt_d_status"."status" as "c0"
from
     "opt_d_status" as "opt_d_status"
where
     "opt_d_status"."status" = 'Locations.Continents'
group by
     "opt_d_status"."status"
order by
     "opt_d_status"."status" ASC
], failed (com.vertica.util.PSQLException: ERROR: invalid input syntax 
for integer: "Locations.Continents")






My mondrian properties are:


mondrian.native.nonempty.enable=true
mondrian.rolap.aggregates.optimizePredicates=false
mondrian.rolap.aggregates.Use = true
mondrian.rolap.aggregates.Read = true




What am I missing??


More information about the Mondrian mailing list