olap – Mondrian:似乎不能使用聚合表

我一直在努力使聚合表工作。这里是我的事实表看起来像:
employment_date_id
dimension1_id
dimension2_id
dimension3_id
dimension4
dimension5
measure1
measure2
measure3

我将jobs_date_id从年,季度和月份折叠为仅包括年份,但包括每隔一列。这是我的聚合表看起来像:

yearquartermonth_year
dimension1_id
dimension2_id
dimension3_id
dimension4
dimension5
measure1
measure2
measure3
fact_count

我只是崩溃的年份部分的日期。其余字段保持不变。这里是我的配置:

<AggFactCount column="FACT_COUNT"/>
<AggForeignKey factColumn="dimension1_id" aggColumn="dimension1_id"/>
<AggForeignKey factColumn="dimension2_id" aggColumn="dimension2_id"/>
<AggForeignKey factColumn="dimension3_id" aggColumn="dimension3_id"/>

<AggMeasure name="[Measures].[measure1]" column="measure1"/>
<AggMeasure name="[Measures].[measure2]" column="measure2"/>
<AggMeasure name="[Measures].[measure3]" column="measure3"/>

<AggLevel name="[dimension4].[dimension4]" column="dimension4"/>
<AggLevel name="[dimension5].[dimension5]" column="dimension5"/>
<AggLevel name="[EmploymentDate.yearQuarterMonth].[Year]" column="yearquartermonth_year"/>

我大部分从documentation复制聚合表的第二个示例。我的大多数列不会折叠到表中,并且是维度表的外键。

我的查询我试图执行是这样的:

select {[Measures].[measure1]} on COLUMNS,{[EmploymentDate.yearQuarterMonth].[Year]} on ROWS from Cube1

问题是,当我调试它,并打开日志记录,我看到位的键,看起来像这样:

AggStar:agg_year_employment
 bk=0x00000000000000000000000000000000000000000000000111111111101111100000000000000000000000000000000000000000000000000000000000000000
 fbk=0x00000000000000000000000000000000000000000000000000000001101111100000000000000000000000000000000000000000000000000000000000000000
 mbk=0x00000000000000000000000000000000000000000000000111111110000000000000000000000000000000000000000000000000000000000000000000000000

我的查询的位模式是:

Foreign columns bit key=0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
Measure bit key=        0x00000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000

所以我的聚合表被跳过。但是,这些是折叠到表中的确切列。但是位的位置在查询和聚合表之间。另一件我发现奇怪的是,一部分列被折叠到表中,但所有AggForeignKeys不包括为位,因此如果我对这些聚合表将跳过这些列进行查询?这是与我计划的相反。我的计划是只要你在年边界使用这个聚合表查询

我不明白为什么这不工作,为什么它不能正确建立位密钥。我试过调试mondrian代码,但找出哪个列映射到位的位在键是不明显的。我觉得这不应该是这么难,但一切都没有真正解释这个很好。而这种聚合表架构真的是打破了。

我究竟做错了什么?为什么我的解决方案不工作?

更新这里是我的mondrian.properties文件

mondrian.jdbcDrivers=com.MysqL.jdbc.Driver,oracle.jdbc.driver.OracleDriver

mondrian.rolap.generate.formatted.sql=true
mondrian.rolap.localePropFile=locale.properties
mondrian.rolap.aggregates.Use=true
mondrian.rolap.aggregates.Read=true

mondrian.trace.level=2

mondrian.drillthrough.enable=true
可能的情况是mondrian.rolap.aggregates.Read设置为true,mondrian.rolap.aggregates.Use设置为false。
请设置mondrian.rolap.aggregates.Use = true并检查。
参考: http://mondrian.pentaho.com/documentation/configuration.php

如果不是这种情况,请附加与聚合表和完整的多维数据集定义XML相关的所有属性

相关文章

迭代器模式(Iterator)迭代器模式(Iterator)[Cursor]意图...
高性能IO模型浅析服务器端编程经常需要构造高性能的IO模型,...
策略模式(Strategy)策略模式(Strategy)[Policy]意图:定...
访问者模式(Visitor)访问者模式(Visitor)意图:表示一个...
命令模式(Command)命令模式(Command)[Action/Transactio...
生成器模式(Builder)生成器模式(Builder)意图:将一个对...