Mondrian遇到的坑

#######################mondrain schema4.0
1.元素<physicalShema>必须要有:指定cube涉及到设事实表和维表的key和关联关系,
但是physicalSchema下面的table必须要:指定cube需要的事实表和维度表,
link不是必须,可由<Dimension>下面的<Join>属性,<MeasureGroups>下面的<DimensionLinks>下面的<ForeignKeyLink>代替。

2.<Dimension>下面的<Join>属性也不是必须要有:指定雪花模型的维度表之间的关联关系。可在<physicalSchema>下的<link>中指定维表之间的关联关系。

3.<MeasureGroups>下面的<DimensionLinks>下面的<ForeignKeyLink>必须要有:指定事实表里面的measures(度量)和维表之间的关联关系。也就是事实表和维度表之间的关联关系。

4.<View>(3.0)和<Query>(4.0)的区别
   使用<View>报错:Caused by: java.sql.SQLException: No suitable driver found for jdbc.mysql://localhost:3306/test 解决:链接写错了
   
   使用<Query>报错:Caused by: org.eigenbase.xom.XOMException: In Schema: In PhysicalSchema: In Query: Attribute 'alias' is unset and has no default value,解决:name改alias(与官网有区别)
   将<Query>的name属性改为alias报错:Caused by: java.sql.SQLException: No suitable driver found for jdbc.mysql://localhost:3306/test 解决:链接写错了
   
   <Query>和<View>功能上一样,但是Query的语法和官网上有点区别,推荐用View。

5.visualCube(3.0?)

6.aggregateTable


######################################mondrainShema的大坑
错误:Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group by `producttype`.`proTypeName` order by ISNULL(`producttype`.`proTypeName`' at line 1
解决:解决:physicalSchema中涉及的要用到的表的定义中有个单词写错了,(Column)写成了Cloumn
错误:定义了Hierarychy,却说attribute必须要有一个Hierarchy,
解决:physicalSchema中涉及的要用到的表的定义中有个单词写错了,(Column)写成了Cloumn

############virtualCube遇到的问题
问题:Caused by: mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while executing query [with set [~COLUMNS_product_product] as '{[product].[product].[productName].Members}'
  set [~COLUMNS_productType_productType] as '{[productType].[productType].[peoductType].Members}'
  set [~ROWS] as 'Hierarchize({{[customer].[customer].[All customers]}, {[customer].[customer].[gender].Members}})'
select NON EMPTY Crossjoin(NonEmptyCrossJoin([~COLUMNS_product_product], [~COLUMNS_productType_productType]), {[Measures].[price], [Measures].[number], [Measures].[total_cost]}) ON COLUMNS,
  NON EMPTY [~ROWS] ON ROWS
from [saleinfo_all]
]


############dimension下包含多个维表的信息的时候,attribute需要指明table属性
第一个是对应hasHierarchy='true'为什么没有重复显示层级的问题,因为product维度下面包含了两个维表的信息,customer维度没有指定table信息,而customer只含有一张维表信息,所以默认不用指定表信息
####################hasAll属性可以不写,默认为true
 

转载于:https://my.oschina.net/zhouwang93/blog/1813690

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值