Category - OpenBI

saiku2 OpenSource OpenBI    2017-07-19 23:19:17    775

1、Setting.js中有个配置项:'saiku.olap.query.automatic_execution': 'true',

1、Setting.js中有个配置项:'saiku.olap.query.automatic_execution': 'true',

2、在Repository界面双击saiku文件查询不自动,需要在Workspace.js文件的410行附近,修改如下代码,将其中调用query.run的代码注释

if (typeof isNew != "undefined") {
//this.query.run(false);
}

 

 


 

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

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

聚合表使用出错

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

 

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

Mondrian schema OpenBI OpenSource    2017-07-19 23:12:45    819
1、首先根据文档介绍,大致了解聚合表的概念:http://blog.linezing.com/?p=1448
2、根据聚合表名称规则建立聚合表(前提是已经有了可以使用的schema的cube,然后添加聚合表)
我的做法是先在schema中定义好聚合表的相关值,如:
<cube name="cube_agent_state" caption="test" encoding="UTF-8">
  <Table name="fact_agent_status_fact">
   <AggName name="agg_c_fact_agent_status_fact" >
       <AggFactCount column="fact_count"/>
       <AggForeignKey factColumn="time_id" aggColumn="time_id" />
       <AggForeignKey factColumn="agent_no" aggColumn="agent_no" />
       <AggForeignKey factColumn="agent_status" aggColumn="agent_status" />
       <AggForeignKey factColumn="reason_code" aggColumn="reason_code" />
       <AggMeasure name="[Measures].[times]" column="times"/>
       <AggMeasure name="[Measures].[length]" column="length"/>
   </AggName>
  </Table>
  <Dimension name="times" foreignKey="time_id" caption="时间">
   <Hierarchy hasAll="true" primaryKey="time_id" > 
    <Table name="dim_date" />
    <Level name="year" column="y_id" uniqueMembers="false" type="String" levelType="TimeYears" c
Mondrian OpenBI OpenSource    2017-07-19 23:06:12    809

找到Mondrian的配置文件mondrian.properties,修改如下几个配置项为如下值即可开启聚合表功能:

 

mondrian.rolap.aggregates.ChooseByVolume=true
mondrian.rolap.aggregates.Read=true
mondrian.rolap.aggregates.Use=true
mondrian.rolap.aggregates.rule.tag=default
mondrian.rolap.aggregates.rules=/DefaultRules.xml
 
 

 

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

2017-07-19 23:04:56    771

 

1、首先下载Saiku3.1的源码:https://github.com/OSBI/saiku/tree/release-3.1
2、以maven项目方式导入到eclipse中(此步骤可以不做)
3、修改下载的根目录中的pom文件,找到build节点-->pluginManagement节点-->plugins中添加如下代码
     org.apache.maven.plugins
     maven-surefire-plugin
     
      true
     


这段代码主要是修改构建过程中跳过junit测试,此项可以不改,使用命令行模式:
mvn clean install -DskipTest
但是到这里大部分人还是会执行失败,接着修改
4、由于saiku-ui执行使用的是ant,需要将构建中关于saiku-ui部分删除,才可以构建成功
首先找到saiku根目录中的pom文件,找到如下代码并将其注释
saiku-ui
saiku-bi-platform-plugin-p5
其中第二项不注释也可以,但是由于我不需要用到这个模块儿,所以也将其注释了

然后找到saiku-server中的pom文件,找到所有关于saiku-ui的代码,全部注释掉,然后再build,应该就成功了
5、项目构建
如果你导入到eclipse中了,那么saiku项目右键-->Run As -->Maven install即可
如果没有导入到eclipse中,那么使用脚本构建
mvn clean install -DskipTest

build成功后,会在saiku-server的target目录中出现如下一些文件

重点在选中文件,打开

但是缺少了ui文件的目录,即ROOT目录,怎么办呢?
有办法,先新建ROOT目录,在github上面下载saiku-ui项目,这里我选择的是主线版本:
https://github.com/OSBI/saiku-ui
下载以后,将所有文件全部放到ROOT目录中,就完成了和官网打包一样的效果了

由于saiku-ui用的ant环境楼主这里没有,所以就用此方法替代下

转载请注明出处,也不枉我辛苦一番,谢谢
 
 
 

 

by 刘迎光@萤火虫工作室
OpenBI交流群:495266201
MicroService 微服务交流群:217722918
mail: liuyg#liuyingguang.cn
博主首

2/7