Commit 80869331 authored by yindanlei's avatar yindanlei

add icon_function_day report codes

parent 19322a17
icon_function_day=首页icon及功能区数据
\ No newline at end of file
--***************************************************************
--*脚本名称:
--*功能: 首页icon及功能区数据
--*业务名称: pm
--*输入数据:
--*作者: yindanlei@igengmei.com
--*更新时间:2020-09-23
--***************************************************************
--设置全局变量&UDF
SET mapreduce.job.queuename=data;
--使用bl数据库
USE pm;
--创建BL层内部表
CREATE TABLE IF NOT EXISTS pm.tl_pm_icon_function_d
(
date string comment '{"chs_name":"日期","description":"","etl":"","value":"","remark":""}',
grey_type string comment '{"chs_name":"灰度","description":"","etl":"","value":"","remark":""}',
dau BIGINT comment '{"chs_name":"dau","description":"","etl":"","value":"","remark":""}',
dau_733 BIGINT comment '{"chs_name":"7.33版本及以上dau","description":"","etl":"","value":"","remark":""}',
gengxinlv string comment '{"chs_name":"版本更新率","description":"","etl":"","value":"","remark":""}',
quanzhong_dau string comment '{"chs_name":"权重日活","description":"","etl":"","value":"","remark":""}',
ciliu string comment '{"chs_name":"次留率","description":"","etl":"","value":"","remark":""}',
function_click_pv_rate string comment '{"chs_name":"功能入口点击率pv","description":"","etl":"","value":"","remark":""}',
function_click_uv_rate string comment '{"chs_name":"功能入口点击率uv","description":"","etl":"","value":"","remark":""}',
icon_click_pv_rate string comment '{"chs_name":"icon点击率pv","description":"","etl":"","value":"","remark":""}',
icon_click_uv_rate string comment '{"chs_name":"icon点击率uv","description":"","etl":"","value":"","remark":""}',
refer_function_wel_pv_rate string comment '{"chs_name":"通过功能区到商详页pv占比","description":"","etl":"","value":"","remark":""}',
refer_function_wel_uv_rate string comment '{"chs_name":"通过功能区到商详页uv占比","description":"","etl":"","value":"","remark":""}',
refer_icon_wel_pv_rate string comment '{"chs_name":"通过icon到商详页pv占比","description":"","etl":"","value":"","remark":""}',
refer_icon_wel_uv_rate string comment '{"chs_name":"通过icon到商详页uv占比","description":"","etl":"","value":"","remark":""}',
click_function_pv string comment '{"chs_name":"功能入口点击pv","description":"","etl":"","value":"","remark":""}',
click_function_uv string comment '{"chs_name":"功能入口点击uv","description":"","etl":"","value":"","remark":""}',
exp_function_pv string comment '{"chs_name":"功能入口曝光pv","description":"","etl":"","value":"","remark":""}',
exp_function_uv string comment '{"chs_name":"功能入口曝光uv","description":"","etl":"","value":"","remark":""}',
click_icon_pv string comment '{"chs_name":"icon点击pv","description":"","etl":"","value":"","remark":""}',
click_icon_uv string comment '{"chs_name":"icon点击uv","description":"","etl":"","value":"","remark":""}',
exp_icon_pv string comment '{"chs_name":"icon曝光pv","description":"","etl":"","value":"","remark":""}',
exp_icon_uv string comment '{"chs_name":"icon曝光uv","description":"","etl":"","value":"","remark":""}',
wel_pv string comment '{"chs_name":"商详页浏览pv","description":"","etl":"","value":"","remark":""}',
wel_uv string comment '{"chs_name":"商详页浏览uv","description":"","etl":"","value":"","remark":""}',
wel_function_pv string comment '{"chs_name":"通过功能区到商详页pv","description":"","etl":"","value":"","remark":""}',
wel_function_uv string comment '{"chs_name":"通过功能区到商详页uv","description":"","etl":"","value":"","remark":""}',
wel_icon_pv string comment '{"chs_name":"通过icon到商详页pv","description":"","etl":"","value":"","remark":""}',
wel_icon_uv string comment '{"chs_name":"通过icon到商详页uv","description":"","etl":"","value":"","remark":""}',
neirong_icon_pv string comment '{"chs_name":"通过icon到内容页pv","description":"","etl":"","value":"","remark":""}',
neirong_icon_uv string comment '{"chs_name":"通过icon到内容页uv","description":"","etl":"","value":"","remark":""}',
all_two_pv string comment '{"chs_name":"通过icon总二跳pv","description":"","etl":"","value":"","remark":""}',
all_two_uv string comment '{"chs_name":"通过icon总二跳uv","description":"","etl":"","value":"","remark":""}'
)comment '首页icon及功能区数据'
PARTITIONED BY (PARTITION_DAY STRING comment '分区日期')
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\t'
COLLECTION ITEMS TERMINATED BY '\002'
MAP KEYS TERMINATED BY '\003'
LINES TERMINATED BY '\n'
STORED AS TEXTFILE;
\ No newline at end of file
This diff is collapsed.
#step1_1.job
type=command
command=sh /home/bi/bi-report/lib/shell/waitsuccess.sh hive online ml_device_day_active_status
\ No newline at end of file
#step1_15.job
#step1_10.job
type=command
command=sh /home/bi/bi-report/lib/shell/waitsuccess.sh hive online ml_device_history_detail
\ No newline at end of file
#step1_16.job
#step1_2.job
type=command
command=sh /home/bi/bi-report/lib/shell/waitsuccess.sh hive dim DIM_AI_CHANNEL_ZP_NEW
\ No newline at end of file
#step1_3.job
type=command
command=sh /home/bi/bi-report/lib/shell/waitsuccess.sh hive online bl_hdfs_maidian_updates
\ No newline at end of file
command=sh /home/bi/bi-report/lib/shell/waitsuccess.sh hive online ml_device_updates
\ No newline at end of file
#step1_4.job
type=command
command=sh /home/bi/bi-report/lib/shell/waitsuccess.sh hive online ml_community_precise_exposure_detail
\ No newline at end of file
#step1_5.job
type=command
command=sh /home/bi/bi-report/lib/shell/waitsuccess.sh hive online bl_hdfs_maidian_updates
\ No newline at end of file
#step1_6.job
type=command
command=sh /home/bi/bi-report/lib/shell/waitsuccess.sh hive online ml_user_updates
\ No newline at end of file
#step1_7.job
type=command
command=sh /home/bi/bi-report/lib/shell/waitsuccess.sh hive online tl_hdfs_doctor_view
\ No newline at end of file
#step1_8.job
type=command
command=sh /home/bi/bi-report/lib/shell/waitsuccess.sh hive ml ml_c_ct_ui_user_dimen_d
\ No newline at end of file
#step1_9.job
type=command
command=sh /home/bi/bi-report/lib/shell/waitsuccess.sh hive online ml_user_history_detail
\ No newline at end of file
#step2.job
type=command
dependencies=step1_1,step1_2,step1_3,step1_4,step1_5,step1_6,step1_7,step1_8,step1_9,step1_10
command=sh /home/bi/bi-report/lib/shell/hive icon_function_day
\ No newline at end of file
#step3.job
type=command
dependencies=step2
command=curl -X GET http://localhost:8553/api/report/email/icon_function_day/yindanlei@igengmei.com
\ No newline at end of file
--首页icon及功能区数据
SELECT
date AS `日期`
,grey_type AS `灰度`
,dau AS `dau`
,dau_733 AS `7.33版本及以上dau`
,gengxinlv AS `版本更新率`
,quanzhong_dau AS `权重日活`
,ciliu AS `次留率`
,function_click_pv_rate AS `功能入口点击率pv`
,function_click_uv_rate AS `功能入口点击率uv`
,icon_click_pv_rate AS `icon点击率pv`
,icon_click_uv_rate AS `icon点击率uv`
,refer_function_wel_pv_rate AS `通过功能区到商详页pv占比`
,refer_function_wel_uv_rate AS `通过功能区到商详页uv占比`
,refer_icon_wel_pv_rate AS `通过icon到商详页pv占比`
,refer_icon_wel_uv_rate AS `通过icon到商详页uv占比`
,click_function_pv AS `功能入口点击pv`
,click_function_uv AS `功能入口点击uv`
,exp_function_pv AS `功能入口曝光pv`
,exp_function_uv AS `功能入口曝光uv`
,click_icon_pv AS `icon点击pv`
,click_icon_uv AS `icon点击uv`
,exp_icon_pv AS `icon曝光pv`
,exp_icon_uv AS `icon曝光uv`
,wel_pv AS `商详页浏览pv`
,wel_uv AS `商详页浏览uv`
,wel_function_pv AS `通过功能区到商详页pv`
,wel_function_uv AS `通过功能区到商详页uv`
,wel_icon_pv AS `通过icon到商详页pv`
,wel_icon_uv AS `通过icon到商详页UV`
,neirong_icon_pv AS `通过icon到内容页pv`
,neirong_icon_uv AS `通过icon到内容页uv`
,all_two_pv AS `通过icon总二跳pv`
,all_two_uv AS `通过icon总二跳uv`
FROM pm.tl_pm_icon_function_d
where partition_day=regexp_replace(DATE_SUB(current_date,1) ,'-','')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment