您好,登錄后才能下訂單哦!
公司的olap用的cubes+mysql,性能有點落后了,所以最近研究一下kylin
參考有贊的這篇文章:
https://tech.youzan.com/kylin-mondrian-saiku/
原理看一下上面的文章,主要記錄一下整合的步驟
首先部署好kylin,具體步驟后續(xù)補充。
下載saiku最新版,解壓。
github上已經(jīng)有一個整合Kylin,Mondrian以及Saiku的項目(作者mustangore):
https://github.com/mustangore/kylin-mondrian-interaction
項目中有步驟,不過是英文的,解釋一下:
1. 進(jìn)入saiku下目錄: $SAIKU_HOME/tomcat/webapps/saiku/WEB-INF/lib/
2. 在當(dāng)前目錄加入kylin-jdbc.jar(在kylin的路徑下,/lib里面),
加入Mondrian 4.4 jar with Kylin dialect(在剛才github項目中/mondrian下),
加入新的Commons HTTPClient jar(在剛才的github項目中/saiku/commons-httpclient-3.1.jar),
刪除舊的Mondrian jar和Commons HTTPClient jar
3. 啟動Saiku (_sh start-saiku.sh_)
4. 訪問 http://saiku-server:8080/
* 用戶名: admin
* 密碼: admin
5. 第一次登錄之前需要license認(rèn)證,認(rèn)證具體過程:
1、https://licensing.meteorite.bi/login 注冊賬號登錄。
2、創(chuàng)建公司記錄。
3、創(chuàng)建license。
4、將license下載到本地。
5、 http://saiku-server:8080/upload.html 將 下載的license文件上傳。上傳完畢之后即可登錄。
如圖:
<?xml version="1.0"?>
<Schema name="ad_schema">
<Cube name="lxw1234_ad_cube2">
<!-- 事實表(fact table) -->
<Table name="AD_REPORT" />
<Dimension name="地域">
<Hierarchy hasAll="false">
<Table name="AD_REPORT"></Table>
<Level name="省份" column="PROVINCE" table="AD_REPORT"></Level>
<Level name="城市" column="CITY" table="AD_REPORT"/>
</Hierarchy>
</Dimension>
<Measure name="曝光數(shù)" column="IMP_PV" aggregator="sum" datatype="Integer" />
<Measure name="唯一曝光數(shù)" column="COOKIEID_IMP" aggregator="distinct-count" datatype="Integer" />
<Measure name="點擊數(shù)" column="CLK_PV" aggregator="sum" datatype="Integer" />
<Measure name="唯一點擊數(shù)" column="COOKIEID_CLK" aggregator="distinct-count" datatype="Integer" />
</Cube>
</Schema>
進(jìn)入Saiku管理控制臺,點擊”Add Schema”,將編寫好Schema文件上傳。
接著點擊”Add Data Source”,添加數(shù)據(jù)源:
回到Saiku Home主頁,點擊”Create a new query”,創(chuàng)建查詢:
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。