zepelinは初めて使用します

8483 ワード

ダウンロード:http://mirror.bit.edu.cn/apache/zeppelin/zeppelin-0.7.1/zeppelin-0.7.1-bin-all.tgz ストレス解消:運行:bin/zepelin-daemen.sh startはstart status retart stopなどの種類があります。http://localhost:8080/ デフォルト8080 zeppelin 初使用_第1张图片をクリックしてクリアーnew noteをクリックして、作業用の新しいnotebookを作成します。notebookの名前をクリックして入ることができます。
右上の角をクリックすると、インタプリタによって、図のように新しいprestoを作成し、関連する接続情報(Zeppelinはsql、shell、shasticsearch、flink、livyなどの各種接続方式)を編集することができます。
notobookで%prestoで以下のように呼びます。%presto select*from table
ds>dsによりテキストボックス指定入力select_from tablewhereds>{ds}(日付入力プラス引用符)を実現することにより、ドロップダウンフレーム入力select*from table where category='{分類='発見'、発見''|''逸品'|'ホット''zeppelin 初使用_第2张图片
%presto
select a.ds as "  ",a.category as "  ",a.module as "  ",d.dau as DAU,d.category_uv as "      " ,a."    ",a."    ",f."      ", b."    ",b."    ",concat(cast(round(100.0*b."    "/d.category_uv,2 ) as varchar), '%') as "     " from
((select ds,category,category_id,module,module_id,count(did) as "    " , count(distinct (did)) as "    " 
from xydb.xyzs_dd_mobile_act_action_detail_xydb where action_type=1 and (sub_action_type=1 or sub_action_type= 2) and  (ds between ${ds} and ${ds1})  and category=${  ='  ','  '|'  '|'  '} group by ds,category,module, category_id,module_id) a
inner join
(select ds,category,category_id,module,module_id,count(did) as "    " , count(distinct (did)) as "    " 
from xydb.xyzs_dd_mobile_act_action_detail_xydb where action_type=2 group by ds,category,module,category_id,module_id) b
on a.ds=b.ds and a.category=b.category and a.module=b.module and a.category_id=b.category_id
and a.module_id=b.module_id
) 
inner join
(select ds,category,module, count(did) as "      " from  xydb.xyzs_dd_mobile_act_action_detail_xydb where action_type =3 group by ds,category, module   order by ds,category)  as f
on a.ds=f.ds and a.category=f.category and a.module=f.module 

left OUTER JOIN 
(select cast(element_at(dim_map,'module_id') as bigint) as module_id, cast(element_at(dim_map,'category_id') as bigint) as category_id,element_at(metrics_map,'dau') as dau,element_at(metrics_map,'category_uv') as category_uv,ds from xydb.xyzs_vd_mobile_report_xydb where  element_at(dim_map,'category_id') is not Null  group by ds,element_at(dim_map,'category_id'),element_at(dim_map,'module_id'),element_at(metrics_map,'dau'),element_at(metrics_map,'category_uv')
) d 
on  ((d."ds" = a."ds") AND (d."category_id" = "a"."category_id") AND (d."module_id" = "a"."module_id"))  
order by a.ds,a.category,a.module  --   
zeppelin 初使用_第3张图片
道を探ることです