2017-03-24 20 views
0

請查看以下在其模式中具有聚合表的mondrian多維數據集上創建JPivot視圖時生成的查詢。在Pentaho Aggregation Designer中創建的聚合表在查詢的from子句中不存在

select 
    `Dim_Time`.`Time_Id` as `c0`, 
    `Dim_Time`.`month_no` as `c1` 
from 
    `Dim_Time` as `Dim_Time` 
where 
    `Dim_Time`.`Time_Id` = `AggTable1`.`Dim_Time_Month_(Key)` 
group by 
    `Dim_Time`.`Time_Id`, 
    `Dim_Time`.`month_no` 
order by 
    ISNULL(`Dim_Time`.`Time_Id`) ASC, `Dim_Time`.`Time_Id` ASC 

爲什麼AggTable1不在from子句中?表&特定列存在於數據庫中。

回答

0

爲了利用聚合表,您必須在mondrian.properties文件中啓用以下屬性。

mondrian.rolap.aggregates.Read=true 
mondrian.rolap.aggregates.Use=true 

還可根據蒙德里安的版本,你必須確定你的架構文件彙總表格

蒙德里安4

<MeasureGroup table='aggregate_table' type='aggregate'> 

蒙德里安3.X

<AggName name="aggregate_table"> 
相關問題