kylin mondrian saiku interaction
来源:互联网 发布:淘宝图片拍摄技巧 编辑:程序博客网 时间:2024/05/21 14:54
steps
download software
hive create table and load demo data
kylin sync table create cube and build
saiku deploy create schema and add data source
test query form saiku against kylin
step 1
download commons-httpclient-3.1.jar
download kylin-jdbc-1.0-incubating.jar
download mondrian-4.4-lagunitas-SNAPSHOT-with-kylin-dialect.jar
download saiku-saiku-3.7.4.zip
step 2 hive create table and load demo data
prepare data
unzip
saiku-saiku-3.7.4.zip
find
saiku-server/data/foodmart_h2.sql
edit this sql and load into mysql
export data from mysql to csv files
create table
- email me for
foodmart.create.hive.tables.sql
this file
- email me for
load data into tables
- email me for
foodmart.load.data.into.table.sql
file andcsv
fiels
- email me for
step 3 kylin sync table create cube and build
sync table
login into kylin webui
click
tables
tabchoose project(create one if you don’t have one)
click
load hive table
button and input these tablenamesaccount, agg_c_10_sales_fact_1997, agg_c_14_sales_fact_1997, agg_c_special_sales_fact_1997, agg_g_ms_pcat_sales_fact_1997, agg_l_03_sales_fact_1997, agg_l_04_sales_fact_1997, agg_l_05_sales_fact_1997, agg_lc_06_sales_fact_1997, agg_lc_100_sales_fact_1997, agg_ll_01_sales_fact_1997, agg_pl_01_sales_fact_1997, category, currency, customer, days, department, employee, employee_closure, expense_fact, inventory_fact_1997, inventory_fact_1998, position, product, product_class, promotion, region, reserve_employee, salary, sales_fact_1997, sales_fact_1998, sales_fact_dec_1998, store, store_ragged, time_by_day, warehouse, warehouse_class
click
sync
button
create cube
login into kylin webui
click
cubes
tabclick
+cube
buttonand in
cube designer
there are 8 steps# 1. cubeinfo # 2. data model # 3. dimensions # 4. measures # 5. filter # 6. refresh setting # 7. advanced setting # 8. overview
click
save
build cube
after you click
save
you will see a cubes tablein the
actions
column of you cube, selectbuild
click
jobs
tabfrom
jobs
tab you will see your cube’s build statuswhen done (progress column will show 100%) click
query
tab
query against your cube
click
query
tabselect your project
input your query
# something like this SELECT COFFEE_BAR, STORE_TYPE, STORE_ID, COUNT(*), SUM(STORE_SQFT), SUM(GROCERY_SQFT) FROM STORE GROUP BY COFFEE_BAR, STORE_TYPE, STORE_ID
step 4 saiku deploy create schema and add data source
deploy saiku
unzip it to somewhere
put these jar files to
saiku-server/tomcat/webapps/saiku/WEB-INF/lib
commons-httpclient-3.1.jar kylin-jdbc-1.0-incubating.jar mondrian-4.4-lagunitas-SNAPSHOT-with-kylin-dialect.jar
delete these old jar files
commons-httpclient-20020423.jar mondrian-4.3.0.1-SPARK.jar
from
saiku-server
folder start saikustart-saiku.sh or start-saiku.bat
create schema, please check my post 2015-11-08-saiku-design-a-schema
create a schema(xml file)
<?xml version='1.0'?> <Schema metamodelVersion="4.0" name="FoodMartKylin"> <PhysicalSchema> <Table name="STORE"> <Key> <Column name="STORE_ID"/> </Key> </Table> </PhysicalSchema> <Dimension key="Store Id" name="Store" table="STORE"> <Attributes> <Attribute hasHierarchy="false" name="Store Country"> <Key> <Column name="STORE_COUNTRY"/> </Key> </Attribute> <Attribute hasHierarchy="false" keyColumn="STORE_STATE" name="Store State"/> <Attribute hasHierarchy="false" name="Store City"> <Key> <Column name="STORE_STATE"/> <Column name="STORE_CITY"/> </Key> <Name> <Column name="STORE_CITY"/> </Name> </Attribute> <Attribute hasHierarchy="false" keyColumn="STORE_ID" name="Store Id"/> <Attribute hasHierarchy="false" keyColumn="STORE_NAME" name="Store Name"> <Property attribute="Store Type"/> <Property attribute="Store Manager"/> <Property attribute="Store Sqft"/> <Property attribute="Grocery Sqft"/> <Property attribute="Frozen Sqft"/> <Property attribute="Meat Sqft"/> <Property attribute="Has coffee bar"/> <Property attribute="Street address"/> </Attribute> <Attribute hierarchyAllMemberName="All Store Types" keyColumn="STORE_TYPE" name="Store Type"/> <Attribute hasHierarchy="false" keyColumn="STORE_MANAGER" name="Store Manager"/> <Attribute hasHierarchy="false" keyColumn="STORE_SQFT" name="Store Sqft"/> <Attribute hasHierarchy="false" keyColumn="GROCERY_SQFT" name="Grocery Sqft"/> <Attribute hasHierarchy="false" keyColumn="FROZEN_SQFT" name="Frozen Sqft"/> <Attribute hasHierarchy="false" keyColumn="MEAT_SQFT" name="Meat Sqft"/> <Attribute hasHierarchy="false" keyColumn="COFFEE_BAR" name="Has coffee bar"/> <Attribute hasHierarchy="false" keyColumn="STORE_STREET_ADDRESS" name="Street address"/> </Attributes> <Hierarchies> <Hierarchy allMemberName="All Stores" name="Stores"> <Level attribute="Store Country"/> <Level attribute="Store State"/> <Level attribute="Store City"/> <Level attribute="Store Name"/> </Hierarchy> <Hierarchy name="Store Size in SQFT"> <Level attribute="Store Sqft"/> </Hierarchy> </Hierarchies> </Dimension> <Cube name="Store"> <Dimensions> <Dimension key="Store Type" name="Store Type"> <Attributes> <Attribute hasHierarchy="true" keyColumn="STORE_TYPE" name="Store Type" table="STORE"/> </Attributes> </Dimension> <Dimension source="Store"/> <Dimension name="Has coffee bar"> <Attributes> <Attribute datatype="Boolean" hasHierarchy="true" keyColumn="COFFEE_BAR" name="Has coffee bar" table="STORE"/> </Attributes> </Dimension> </Dimensions> <MeasureGroups> <MeasureGroup name="Store" table="STORE"> <Measures> <Measure aggregator="sum" column="STORE_SQFT" formatString="#,###" name="Store Sqft"/> <Measure aggregator="sum" column="GROCERY_SQFT" formatString="#,###" name="Grocery Sqft"/> </Measures> <DimensionLinks> <FactLink dimension="Store"/> <FactLink dimension="Store Type"/> <FactLink dimension="Has coffee bar"/> </DimensionLinks> </MeasureGroup> </MeasureGroups> </Cube> </Schema>
login into saiku webui use
admin/admin
click
admin console
tabin
data source management
chooseadd schema
# 1. choose your schema file # 2. input a schema name(e.g. foodmart_kylin) # 3. upload it
add data source
login into saiku webui use
admin/admin
click
admin console
tabin
data source management
chooseadd data source
name: foodmart_kylin connection type: mondrian url: jdbc:kylin://localhost:7070/kylin_project schema: /datasources/foodmart_kylin.xml jdbc driver: org.apache.kylin.jdbc.Driver username: ADMIN password: ADMIN
click
save
step 5 test query form saiku against kylin
login into saiku webui use
admin/admin
click
new query
tabdrag drag drag
done
reference
- mustangore’s github repo kylin-mondrian-interaction
- kylin mondrian saiku interaction
- Kylin, Mondrian, Saiku系统的整合
- Kylin, Mondrian, Saiku系统的整合
- saiku mondrian
- saiku无缝对接kylin
- saiku无缝对接kylin
- kylin + Calcite + Saiku
- saiku与kylin整合备忘录
- Saiku Mondrian Schema雪花模型写法
- Saiku+Kylin多维分析平台探索
- Saiku + Kylin 多维分析平台探索
- Kylin系列-使用Saiku+Kylin构建多维分析OLAP平台
- Saiku配置Mondrian中Schema中文乱码问题解决方案
- Saiku配置Mondrian中Schema中文乱码问题解决方案
- 使用Saiku+Kylin构建多维分析OLAP平台
- 使用Saiku+Kylin构建多维分析OLAP平台
- Mondrian 4 测试的简单demo(Saiku简单测试Schema文件)
- Mondrian
- Mybatis学习之集成spring3(5)
- DFS解决n皇后问题
- sublime安装使用
- iOS开发之日志框架CocoaLumberjack的配置与使用详解
- NET(C#):使用HttpWebRequest头中的Range下载文件片段
- kylin mondrian saiku interaction
- C语言的特点
- 几种常用的正则表达式
- 神经网络概述
- Navicat Mac 有哪些快捷键
- Java或Web中解决所有路径问题
- leetcode 299. Bulls and Cows
- ADB Commands Cheat Sheet
- Spring MVC 获取请求参数的几种方法