Tag - mondrian

mondrian 聚合表    2017-07-19 23:16:41    1217

聚合表使用出错

可能出现的原因:
1、schema中配置错误
2、如果在mondrian.propertities中配置了开启聚合表功能,并且在schema文件中没有配置聚合表的内容,那么检查数据库中是否存在聚合表命名规则的表存在,如果存在,修改名称或者删除表,否则仍然会报错
 
 

 

by 刘迎光@萤火虫工作室
OpenBI交流群:495266201
MicroService 微服务交流群:217722918
mail: liuyg#liuyingguang.cn
博主首页(防止爬虫):http://blog.liuyingguang.cn
OpenBI问答社区:http://openbi.liuyingguang.cn/

saiku mondrian 缓存 OpenBI    2017-07-19 20:45:01    844

saiku提供了刷新缓存的方法:

org.saiku.web.rest.resources.OlapDiscoverResource.refreshConnections()
或者页面调用URL:http://localhost:8090/saiku/rest/saiku/anonymousUser/discover/refresh
        其最终刷新Mondrian缓存的方法是:
        


 

by 刘迎光@萤火虫工作室 
OpenBI交流群:495266201 
MicroService 微服务交流群:217722918 
mail: liuyg#liuyingguang.cn 
博主首页(==防止爬虫==):http://blog.liuyingguang.cn

mondrian saiku schema OpenBI    2017-07-19 20:38:42    867

整理此文章方便大家做测试(手写Mondrian Schema自测),不必每次都向saiku上传文件了

关键文件

  • foodmart4.xml 测试对应的schema文件
  • foodmart-sql.zip 测试对应的数据库脚本

maven项目:
pom文件

  1. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  2. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  3. <modelVersion>4.0.0</modelVersion>
  4. <groupId>cn.firewarm</groupId>
  5. <artifactId>testMondrian</artifactId>
  6. <packaging>war</packaging>
  7. <version>0.0.1-SNAPSHOT</version>
  8. <name>testMondrian Maven Webapp</name>
  9. <url>http://maven.apache.org</url>
  10. <repositories>
  11. <repository>
  12. <id>mine</id>
  13. <name>public Releases</name>
  14. <layout>default</layout>
  15. <url>http://nexus.liuyingguang.cn:8081/nexus/content/groups/public/</url>
  16. </repository>
  17. <repository>
  18. <id>mine-meteorite-bi-release</id>
  19. <name>pub
mondrian schema mdx OpenBI    2017-03-26 21:15:02    923

如下schema代码片段:

  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <Schema name="报表">
  3. <cube name="cube_qc_pass_item" caption="报表1" encoding="UTF-8">
  4. <table name="fact_qc_pass_record_item_join">
  5. <Dimension name="models" foreignKey="model_id" caption="模板">
  6. <Hierarchy hasAll="true" allMemberName="model_name" primaryKey="id" primaryKeyTable="dim_qc_model">
  7. <Table name="dim_qc_model" />
  8. <Level name="model_name" column="name" caption="模板"/>
  9. <Level name="model_id" column="id" caption="model_id"/>
  10. </Hierarchy>
  11. </Dimension>
  12. <Measure name="times" column="id" aggregator="count" formatString="#,###0" datatype="Numeric" caption="总量"/>
  13. </cube>
  14. </Schema>

我想要在使用mdx查询的时候,使用model_name显示,使用model_id作为查询条件限制某个model_id,该如何书写mdx语句?

已经有如下错误的mdx语句了

mdx查询语句1:

  1. SELECT
  2. NON EMPTY {Hierarchize({{[Measures].[times], [Measures].[notPass], [Measures].[pass]}})}