Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bi-report
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data
bi-report
Commits
957dae4a
Commit
957dae4a
authored
Jun 22, 2020
by
魏艺敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update codes
parent
aaa2830f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
395 additions
and
0 deletions
+395
-0
en-cn.properties
conf/en-cn.properties
+2
-0
step1_1.job
jobs/search_related/step1_1.job
+4
-0
step2.job
jobs/search_related/step2.job
+5
-0
step3.job
jobs/search_related/step3.job
+5
-0
step4.job
jobs/search_related/step4.job
+5
-0
search_click_path.sql
sqls/search_related/search_click_path.sql
+13
-0
search_input_type.sql
sqls/search_related/search_input_type.sql
+39
-0
search_result_click_rate.sql
sqls/search_related/search_result_click_rate.sql
+39
-0
search_click_path_insert.sql
sqls/search_related_insert/search_click_path_insert.sql
+107
-0
search_input_type_insert.sql
sqls/search_related_insert/search_input_type_insert.sql
+0
-0
search_result_click_rate_insert.sql
...search_related_insert/search_result_click_rate_insert.sql
+0
-0
create_meigou_source-pv.sql
tables/create_meigou_source-pv.sql
+0
-0
create_recommend_daily_data.sql
tables/create_recommend_daily_data.sql
+47
-0
create_search_click_path.sql
tables/create_search_click_path.sql
+33
-0
create_search_input_type.sql
tables/create_search_input_type.sql
+31
-0
create_search_result_click_rate.sql
tables/create_search_result_click_rate.sql
+65
-0
No files found.
conf/en-cn.properties
View file @
957dae4a
...
...
@@ -10,4 +10,6 @@ meigou-detail-page-source-pv=美购详情页来源pv
meigou-detail-page-source-uv
=
美购详情页来源uv
daily_content_data
=
内容日报-新
search_click_path
=
分搜索入口的搜索框点击数据
search_result_click_rate
=
分搜索词转化率数据
search_input_type
=
分搜索方式近7天数据
daily_recommend_strategy
=
首页推荐策略日报
jobs/search_related/step1_1.job
0 → 100644
View file @
957dae4a
#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
jobs/search_related/step2.job
0 → 100644
View file @
957dae4a
#step2.job
type=command
dependencies=step1_1,step1_2
command=curl -X GET http://localhost:8553/api/report/execSql?name=search_related_insert
\ No newline at end of file
jobs/search_related/step3.job
0 → 100644
View file @
957dae4a
#step3.job
type=command
dependencies=step2
command=sh /home/bi/bi-report/lib/shell/waitsuccess.sh hive pm tl_pm_search_click_path_d
\ No newline at end of file
jobs/search_related/step4.job
0 → 100644
View file @
957dae4a
#step4.job
type=command
dependencies=step3
command=curl -X GET http://localhost:8553/api/report/sendEmail/weiyimin@igengmei.com/search_related
\ No newline at end of file
sqls/search_related/search_click_path.sql
0 → 100644
View file @
957dae4a
SELECT
day_id
AS
`日期`
,
device_os_type
AS
`设备类型`
,
active_type
AS
`活跃类型`
,
search_entrance
AS
`搜索入口`
,
click_search_pv
AS
`点击搜索框pv`
,
click_search_uv
AS
`点击搜索框uv`
FROM
pm
.
tl_pm_search_click_path_d
WHERE
partition_day
>=
'20200619'
and
partition_day
<=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
order
by
`日期`
desc
,
`设备类型`
,
`活跃类型`
,
`点击搜索框pv`
desc
\ No newline at end of file
sqls/search_related/search_input_type.sql
0 → 100644
View file @
957dae4a
SELECT
day_id
AS
`日期`
,
query
AS
`关键词`
,
search_pv
AS
`搜索量`
,
search_uv
AS
`搜索uv`
,
NVL
(
case
when
NVL
(
t2
.
page_more_pv
,
0
)
>
0
then
concat
(
round
(
t2
.
more_click_pv
*
100
/
t2
.
page_more_pv
,
2
)
,
'%'
)
else
0
end
,
0
)
as
`搜索综合结果页内容卡片点击PV/搜索综合结果页浏览pv`
,
NVL
(
case
when
NVL
(
t2
.
page_more_pv
,
0
)
>
0
then
concat
(
round
(
t2
.
more_click_10_pv
*
100
/
t2
.
page_more_pv
,
2
)
,
'%'
)
else
0
end
,
0
)
as
`搜索综合结果页前10内容卡片点击PV/搜索综合结果页浏览pv`
,
NVL
(
case
when
NVL
(
t2
.
page_more_pv
,
0
)
>
0
then
concat
(
round
(
t2
.
more_click_5_diary_pv
*
100
/
t2
.
page_more_pv
,
2
),
'%'
)
else
0
end
,
0
)
as
`搜索综合结果页前5日记卡片点击PV/搜索综合结果页浏览pv`
,
NVL
(
case
when
NVL
(
t2
.
page_more_pv
,
0
)
>
0
then
concat
(
round
(
t2
.
more_click_5_answer_pv
*
100
/
t2
.
page_more_pv
,
2
),
'%'
)
else
0
end
,
0
)
as
`搜索综合结果页前5问答卡片点击PV/搜索综合结果页浏览pv`
,
NVL
(
case
when
NVL
(
t2
.
page_more_pv
,
0
)
>
0
then
concat
(
round
(
t2
.
more_click_5_topic_pv
*
100
/
t2
.
page_more_pv
,
2
),
'%'
)
else
0
end
,
0
)
as
`搜索综合结果页前5帖子卡片点击PV/搜索综合结果页浏览pv`
,
NVL
(
case
when
NVL
(
t2
.
page_wel_pv
,
0
)
>
0
then
concat
(
round
(
t2
.
wel_click_pv
*
100
/
t2
.
page_wel_pv
,
2
),
'%'
)
else
0
end
,
0
)
as
`搜索美购结果页卡片点击PV/搜索美购结果页pv`
,
NVL
(
case
when
NVL
(
t2
.
page_wel_pv
,
0
)
>
0
then
concat
(
round
(
t2
.
wel_click_10_pv
*
100
/
t2
.
page_wel_pv
,
2
),
'%'
)
else
0
end
,
0
)
as
`搜索美购结果页前10卡片点击PV/搜索美购结果页pv`
,
NVL
(
case
when
NVL
(
t2
.
page_wel_pv
,
0
)
>
0
then
concat
(
round
(
t2
.
wel_click_5_pv
*
100
/
t2
.
page_wel_pv
,
2
),
'%'
)
else
0
end
,
0
)
as
`搜索美购结果页前5卡片点击PV/搜索美购结果页pv`
,
NVL
(
case
when
NVL
(
t2
.
page_diary_pv
,
0
)
>
0
then
concat
(
round
(
t2
.
diary_click_pv
*
100
/
t2
.
page_diary_pv
,
2
),
'%'
)
else
0
end
,
0
)
as
`搜索日记结果页卡片点击PV/搜索日记结果页pv`
,
NVL
(
case
when
NVL
(
t2
.
page_diary_pv
,
0
)
>
0
then
concat
(
round
(
t2
.
diary_click_10_pv
*
100
/
t2
.
page_diary_pv
,
2
),
'%'
)
else
0
end
,
0
)
as
`搜索日记结果页前10卡片点击PV/搜索日记结果页pv`
,
NVL
(
case
when
NVL
(
t2
.
page_diary_pv
,
0
)
>
0
then
concat
(
round
(
t2
.
diary_click_5_pv
*
100
/
t2
.
page_diary_pv
,
2
),
'%'
)
else
0
end
,
0
)
as
`搜索日记结果页前5卡片点击PV/搜索日记结果页pv`
,
search_more_pv
AS
`综合tab下的搜索的点击pv`
,
page_more_pv
AS
`搜索综合结果页浏览PV`
,
more_click_pv
AS
`搜索综合结果页内容卡片点击PV`
,
more_click_10_pv
AS
`搜索综合结果页前10内容卡片点击PV`
,
more_click_5_diary_pv
AS
`搜索综合结果页前5日记卡片点击PV`
,
more_click_5_answer_pv
AS
`搜索综合结果页前5问答卡片点击PV`
,
more_click_5_topic_pv
AS
`搜索综合结果页前5帖子卡片点击PV`
,
search_wel_pv
AS
`美购tab下的搜索的点击pv`
,
page_wel_pv
AS
`搜索美购结果页浏览pv`
,
wel_click_pv
AS
`搜索美购结果页卡片点击PV`
,
wel_click_10_pv
AS
`搜索美购结果页前10卡片点击PV`
,
wel_click_5_pv
AS
`搜索美购结果页前5卡片点击PV`
,
search_diary_pv
AS
`日记tab下的搜索的点击pv`
,
page_diary_pv
AS
`搜索日记结果页浏览pv`
,
diary_click_pv
AS
`搜索日记结果页卡片点击PV`
,
diary_click_10_pv
AS
`搜索日记结果页前10卡片点击PV`
,
diary_click_5_pv
AS
`搜索日记结果页前5卡片点击PV`
FROM
pm
.
tl_pm_search_result_click_rate_d
WHERE
partition_day
>=
'20200619'
and
partition_day
<=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
order
by
`日期`
desc
,
`搜索量`
desc
,
`关键词`
sqls/search_related/search_result_click_rate.sql
0 → 100644
View file @
957dae4a
SELECT
day_id
AS
`日期`
,
query
AS
`关键词`
,
search_pv
AS
`搜索量`
,
search_uv
AS
`搜索uv`
,
NVL
(
case
when
NVL
(
t2
.
page_more_pv
,
0
)
>
0
then
concat
(
round
(
t2
.
more_click_pv
*
100
/
t2
.
page_more_pv
,
2
)
,
'%'
)
else
0
end
,
0
)
as
`搜索综合结果页内容卡片点击PV/搜索综合结果页浏览pv`
,
NVL
(
case
when
NVL
(
t2
.
page_more_pv
,
0
)
>
0
then
concat
(
round
(
t2
.
more_click_10_pv
*
100
/
t2
.
page_more_pv
,
2
)
,
'%'
)
else
0
end
,
0
)
as
`搜索综合结果页前10内容卡片点击PV/搜索综合结果页浏览pv`
,
NVL
(
case
when
NVL
(
t2
.
page_more_pv
,
0
)
>
0
then
concat
(
round
(
t2
.
more_click_5_diary_pv
*
100
/
t2
.
page_more_pv
,
2
),
'%'
)
else
0
end
,
0
)
as
`搜索综合结果页前5日记卡片点击PV/搜索综合结果页浏览pv`
,
NVL
(
case
when
NVL
(
t2
.
page_more_pv
,
0
)
>
0
then
concat
(
round
(
t2
.
more_click_5_answer_pv
*
100
/
t2
.
page_more_pv
,
2
),
'%'
)
else
0
end
,
0
)
as
`搜索综合结果页前5问答卡片点击PV/搜索综合结果页浏览pv`
,
NVL
(
case
when
NVL
(
t2
.
page_more_pv
,
0
)
>
0
then
concat
(
round
(
t2
.
more_click_5_topic_pv
*
100
/
t2
.
page_more_pv
,
2
),
'%'
)
else
0
end
,
0
)
as
`搜索综合结果页前5帖子卡片点击PV/搜索综合结果页浏览pv`
,
NVL
(
case
when
NVL
(
t2
.
page_wel_pv
,
0
)
>
0
then
concat
(
round
(
t2
.
wel_click_pv
*
100
/
t2
.
page_wel_pv
,
2
),
'%'
)
else
0
end
,
0
)
as
`搜索美购结果页卡片点击PV/搜索美购结果页pv`
,
NVL
(
case
when
NVL
(
t2
.
page_wel_pv
,
0
)
>
0
then
concat
(
round
(
t2
.
wel_click_10_pv
*
100
/
t2
.
page_wel_pv
,
2
),
'%'
)
else
0
end
,
0
)
as
`搜索美购结果页前10卡片点击PV/搜索美购结果页pv`
,
NVL
(
case
when
NVL
(
t2
.
page_wel_pv
,
0
)
>
0
then
concat
(
round
(
t2
.
wel_click_5_pv
*
100
/
t2
.
page_wel_pv
,
2
),
'%'
)
else
0
end
,
0
)
as
`搜索美购结果页前5卡片点击PV/搜索美购结果页pv`
,
NVL
(
case
when
NVL
(
t2
.
page_diary_pv
,
0
)
>
0
then
concat
(
round
(
t2
.
diary_click_pv
*
100
/
t2
.
page_diary_pv
,
2
),
'%'
)
else
0
end
,
0
)
as
`搜索日记结果页卡片点击PV/搜索日记结果页pv`
,
NVL
(
case
when
NVL
(
t2
.
page_diary_pv
,
0
)
>
0
then
concat
(
round
(
t2
.
diary_click_10_pv
*
100
/
t2
.
page_diary_pv
,
2
),
'%'
)
else
0
end
,
0
)
as
`搜索日记结果页前10卡片点击PV/搜索日记结果页pv`
,
NVL
(
case
when
NVL
(
t2
.
page_diary_pv
,
0
)
>
0
then
concat
(
round
(
t2
.
diary_click_5_pv
*
100
/
t2
.
page_diary_pv
,
2
),
'%'
)
else
0
end
,
0
)
as
`搜索日记结果页前5卡片点击PV/搜索日记结果页pv`
,
search_more_pv
AS
`综合tab下的搜索的点击pv`
,
page_more_pv
AS
`搜索综合结果页浏览PV`
,
more_click_pv
AS
`搜索综合结果页内容卡片点击PV`
,
more_click_10_pv
AS
`搜索综合结果页前10内容卡片点击PV`
,
more_click_5_diary_pv
AS
`搜索综合结果页前5日记卡片点击PV`
,
more_click_5_answer_pv
AS
`搜索综合结果页前5问答卡片点击PV`
,
more_click_5_topic_pv
AS
`搜索综合结果页前5帖子卡片点击PV`
,
search_wel_pv
AS
`美购tab下的搜索的点击pv`
,
page_wel_pv
AS
`搜索美购结果页浏览pv`
,
wel_click_pv
AS
`搜索美购结果页卡片点击PV`
,
wel_click_10_pv
AS
`搜索美购结果页前10卡片点击PV`
,
wel_click_5_pv
AS
`搜索美购结果页前5卡片点击PV`
,
search_diary_pv
AS
`日记tab下的搜索的点击pv`
,
page_diary_pv
AS
`搜索日记结果页浏览pv`
,
diary_click_pv
AS
`搜索日记结果页卡片点击PV`
,
diary_click_10_pv
AS
`搜索日记结果页前10卡片点击PV`
,
diary_click_5_pv
AS
`搜索日记结果页前5卡片点击PV`
FROM
pm
.
tl_pm_search_result_click_rate_d
WHERE
partition_day
>=
'20200619'
and
partition_day
<=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
order
by
`日期`
desc
,
`搜索量`
desc
,
`关键词`
sqls/search_related_insert/search_click_path_insert.sql
0 → 100644
View file @
957dae4a
INSERT
OVERWRITE
TABLE
pm
.
tl_pm_search_click_path_d
PARTITION
(
PARTITION_DAY
=
#
partition_day
)
SELECT
day_id
as
day_id
,
device_os_type
as
device_os_type
,
active_type
as
active_type
,
v
.
search_entrance
as
search_entrance
,
sum
(
search_pv
)
as
click_search_pv
,
sum
(
search_uv
)
as
click_search_uv
FROM
(
SELECT
day_id
,
device_os_type
,
active_type
,
array
(
search_entrance
,
'合计'
)
as
search_entrance
,
search_pv
,
search_uv
FROM
(
SELECT
t1
.
partition_date
as
day_id
,
t1
.
device_os_type
,
t1
.
active_type
,
case
when
action
=
'on_click_navbar_search'
and
page_name
=
'home'
then
'首页搜索框'
when
action
=
'on_click_navbar_search'
and
page_name
=
'welfare_home'
then
'美购首页搜索框'
when
action
=
'on_click_navbar_search'
and
page_name
=
'category'
then
'品类聚合页搜索框'
when
action
=
'on_click_navbar_search'
and
page_name
=
'welfare_list'
and
referrer_link
=
'["home","category"]'
then
'来自品类聚合的美购列表页搜索框'
when
action
=
'on_click_navbar_search'
and
page_name
=
'welfare_list'
and
referrer_link
=
'["welfare_home"]'
then
'来自美购首页的美购列表页搜索框'
when
action
in
(
'do_search'
,
'on_click_navbar_search'
)
and
page_name
in
(
'diary_detail'
,
'topic_detail'
,
'post_detail'
,
'user_post_detail'
,
'doctor_post_detail'
,
'question_detail'
,
'answer_detail'
,
'question_answer_detail'
)
then
'内容详情页搜索框'
when
action
=
'详情页高亮词'
then
'详情页高亮词搜索'
when
action
=
'大家都在看'
then
'首页feed大家都在看'
when
action
=
'热搜词'
then
'美购首页热搜词'
else
null
end
as
search_entrance
,
count
(
cl_id
)
as
search_pv
,
count
(
distinct
cl_id
)
as
search_uv
FROM
(
SELECT
partition_date
,
device_os_type
,
case
WHEN
active_type
=
'4'
THEN
'老活跃设备'
WHEN
active_type
in
(
'1'
,
'2'
)
then
'新增设备'
END
as
active_type
,
device_id
FROM
online
.
ml_device_day_active_status
where
partition_date
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
AND
active_type
in
(
'1'
,
'2'
,
'4'
)
and
first_channel_source_type
not
in
(
'yqxiu1'
,
'yqxiu2'
,
'yqxiu3'
,
'yqxiu4'
,
'yqxiu5'
,
'mxyc1'
,
'mxyc2'
,
'mxyc3'
,
'wanpu'
,
'jinshan'
,
'jx'
,
'maimai'
,
'zhuoyi'
,
'huatian'
,
'suopingjingling'
,
'mocha'
,
'mizhe'
,
'meika'
,
'lamabang'
,
'js-az1'
,
'js-az2'
,
'js-az3'
,
'js-az4'
,
'js-az5'
,
'jfq-az1'
,
'jfq-az2'
,
'jfq-az3'
,
'jfq-az4'
,
'jfq-az5'
,
'toufang1'
,
'toufang2'
,
'toufang3'
,
'toufang4'
,
'toufang5'
,
'toufang6'
,
'TF-toufang1'
,
'TF-toufang2'
,
'TF-toufang3'
,
'TF-toufang4'
,
'TF-toufang5'
,
'tf-toufang1'
,
'tf-toufang2'
,
'tf-toufang3'
,
'tf-toufang4'
,
'tf-toufang5'
,
'benzhan'
,
'promotion_aso100'
,
'promotion_qianka'
,
'promotion_xiaoyu'
,
'promotion_dianru'
,
'promotion_malioaso'
,
'promotion_malioaso-shequ'
,
'promotion_shike'
,
'promotion_julang_jl03'
,
'promotion_zuimei'
)
AND
first_channel_source_type
not
like
'promotion
\_
jf
\_
%'
)
t1
join
(
SELECT
partition_date
,
cl_id
,
page_name
,
action
,
params
[
'referrer_link'
]
as
referrer_link
FROM
online
.
bl_hdfs_maidian_updates
where
partition_date
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
and
action
in
(
'do_search'
,
'on_click_navbar_search'
)
union
all
SELECT
partition_date
,
cl_id
,
null
as
page_name
,
'大家都在看'
as
action
,
null
as
referrer_link
FROM
online
.
bl_hdfs_maidian_updates
where
partition_date
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
AND
action
=
'on_click_card'
AND
params
[
'in_page_pos'
]
=
'猜你喜欢'
AND
params
[
'tab_name'
]
=
'精选'
AND
params
[
'card_type'
]
=
'search_word'
--AND page_name='home' android的page_name为空
union
all
SELECT
partition_date
,
cl_id
,
null
as
page_name
,
'热搜词'
as
action
,
null
as
referrer_link
FROM
online
.
bl_hdfs_maidian_updates
where
partition_date
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
AND
action
=
'on_click_card'
AND
page_name
=
'welfare_home'
AND
params
[
'card_type'
]
=
'search_word'
AND
params
[
'in_page_pos'
]
=
'大家都在搜'
union
all
select
partition_date
,
cl_id
,
null
as
page_name
,
'详情页高亮词'
as
action
,
null
as
referrer_link
from
online
.
bl_hdfs_maidian_updates
where
partition_date
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
and
action
=
'on_click_card'
and
params
[
'card_type'
]
=
'highlight_word'
)
t2
on
t1
.
partition_date
=
t2
.
partition_date
and
t1
.
device_id
=
t2
.
cl_id
group
by
t1
.
partition_date
,
t1
.
device_os_type
,
t1
.
active_type
,
case
when
action
=
'on_click_navbar_search'
and
page_name
=
'home'
then
'首页搜索框'
when
action
=
'on_click_navbar_search'
and
page_name
=
'welfare_home'
then
'美购首页搜索框'
when
action
=
'on_click_navbar_search'
and
page_name
=
'category'
then
'品类聚合页搜索框'
when
action
=
'on_click_navbar_search'
and
page_name
=
'welfare_list'
and
referrer_link
=
'["home","category"]'
then
'来自品类聚合的美购列表页搜索框'
when
action
=
'on_click_navbar_search'
and
page_name
=
'welfare_list'
and
referrer_link
=
'["welfare_home"]'
then
'来自美购首页的美购列表页搜索框'
when
action
in
(
'do_search'
,
'on_click_navbar_search'
)
and
page_name
in
(
'diary_detail'
,
'topic_detail'
,
'post_detail'
,
'user_post_detail'
,
'doctor_post_detail'
,
'question_detail'
,
'answer_detail'
,
'question_answer_detail'
)
then
'内容详情页搜索框'
when
action
=
'详情页高亮词'
then
'详情页高亮词搜索'
when
action
=
'大家都在看'
then
'首页feed大家都在看'
when
action
=
'热搜词'
then
'美购首页热搜词'
else
null
end
having
search_entrance
is
not
null
)
t
)
n
LATERAL
VIEW
explode
(
n
.
search_entrance
)
v
AS
search_entrance
group
by
day_id
,
device_os_type
,
active_type
,
v
.
search_entrance
sqls/search_related_insert/search_input_type_insert.sql
0 → 100644
View file @
957dae4a
This diff is collapsed.
Click to expand it.
sqls/search_related_insert/search_result_click_rate_insert.sql
0 → 100644
View file @
957dae4a
This diff is collapsed.
Click to expand it.
tables/create_meigou_source-pv.sql
0 → 100644
View file @
957dae4a
This diff is collapsed.
Click to expand it.
tables/create_recommend_daily_data.sql
0 → 100644
View file @
957dae4a
--***************************************************************
--*脚本名称: create_pm_c_op_co_content_dimen_d.sql
--*功能: 内容日报
--*业务名称: pm
--*输入数据:
--*作者: weiyimin@igengmei.com
--*更新时间: 2020-5-25 11:00
--***************************************************************
--设置全局变量&UDF
SET
mapreduce
.
job
.
queuename
=
data
;
--使用bl数据库
USE
pm
;
--创建BL层内部表
CREATE
TABLE
IF
NOT
EXISTS
pm
.
tl_pm_recommend_strategy_d
(
day_id
string
comment
'{"chs_name":"当天日期","description":"","etl":"","value":"","remark":""}'
,
device_os_type
string
comment
'{"chs_name":"设备类型","description":"","etl":"","value":"","remark":""}'
,
active_type
string
comment
'{"chs_name":"活跃类型","description":"","etl":"","value":"","remark":""}'
,
card_content_type
string
comment
'{"chs_name":"卡片类型","description":"","etl":"","value":"","remark":""}'
,
recommend_type
string
comment
'{"chs_name":"推荐类型","description":"","etl":"","value":"","remark":""}'
,
home_ctr
string
comment
'{"chs_name":"首页卡片点击PV/首页卡片精准曝光PV","description":"","etl":"","value":"","remark":""}'
,
second_rate
string
comment
'{"chs_name":"来自首页推荐内容卡片的的总商业二跳pv/首页卡片精准曝光PV","description":"","etl":"","value":"","remark":""}'
,
first_rate
string
comment
'{"chs_name":"来自首页推荐内容卡片的的总商业二跳pv/首页卡片点击PV","description":"","etl":"","value":"","remark":""}'
,
card_click
BIGINT
comment
'{"chs_name":"首页卡片点击PV","description":"","etl":"","value":"","remark":""}'
,
card_exposure
BIGINT
comment
'{"chs_name":"首页卡片精准曝光PV","description":"","etl":"","value":"","remark":""}'
,
total_second_click
BIGINT
comment
'{"chs_name":"来自首页卡片的总商业二跳pv(包含页面上搜索及卡片点击)","description":"","etl":"","value":"","remark":""}'
,
avg_page_stay
double
comment
'{"chs_name":"来自首页卡片的单PV平均浏览时长","description":"","etl":"","value":"","remark":""}'
,
navbar_search
BIGINT
comment
'{"chs_name":"来自首页卡片的搜索框+搜索按钮点击PV","description":"","etl":"","value":"","remark":""}'
,
highlight_word
BIGINT
comment
'{"chs_name":"来自首页卡片的文内搜索点击PV","description":"","etl":"","value":"","remark":""}'
,
self_welfare_card
BIGINT
comment
'{"chs_name":"来自首页卡片的商品卡片点击PV","description":"","etl":"","value":"","remark":""}'
,
recommend_welfare_card
BIGINT
comment
'{"chs_name":"来自首页卡片的推荐商品+查看全部商品点击pv","description":"","etl":"","value":"","remark":""}'
,
recommend_content_card
BIGINT
comment
'{"chs_name":"来自首页卡片的推荐内容点击pv","description":"","etl":"","value":"","remark":""}'
,
recommend_special_card
BIGINT
comment
'{"chs_name":"来自首页卡片的推荐专题点击pv","description":"","etl":"","value":"","remark":""}'
,
transfer_card
BIGINT
comment
'{"chs_name":"来自首页卡片的转诊点击pv","description":"","etl":"","value":"","remark":""}'
,
video_consultation
BIGINT
comment
'{"chs_name":"来自首页卡片的视频面诊点击pv","description":"","etl":"","value":"","remark":""}'
)
comment
'首页推荐策略日报'
PARTITIONED
BY
(
PARTITION_DAY
STRING
comment
'分区日期'
)
ROW
FORMAT
DELIMITED
FIELDS
TERMINATED
BY
'
\t
'
COLLECTION
ITEMS
TERMINATED
BY
'
\0
02'
MAP
KEYS
TERMINATED
BY
'
\0
03'
LINES
TERMINATED
BY
'
\n
'
STORED
AS
TEXTFILE
;
\ No newline at end of file
tables/create_search_click_path.sql
0 → 100644
View file @
957dae4a
--***************************************************************
--*脚本名称: create_pm_c_op_co_content_dimen_d.sql
--*功能: 内容日报
--*业务名称: pm
--*输入数据:
--*作者: weiyimin@igengmei.com
--*更新时间: 2020-5-25 11:00
--***************************************************************
--设置全局变量&UDF
SET
mapreduce
.
job
.
queuename
=
data
;
--使用bl数据库
USE
pm
;
--创建BL层内部表
CREATE
TABLE
IF
NOT
EXISTS
pm
.
tl_pm_search_click_path_d
(
day_id
string
comment
'{"chs_name":"当天日期","description":"","etl":"","value":"","remark":""}'
,
device_os_type
string
comment
'{"chs_name":"设备类型","description":"","etl":"","value":"","remark":""}'
,
active_type
string
comment
'{"chs_name":"活跃类型","description":"","etl":"","value":"","remark":""}'
,
search_entrance
string
comment
'{"chs_name":"搜索入口","description":"","etl":"","value":"","remark":""}'
,
click_search_pv
int
comment
'{"chs_name":"点击搜索或搜索框pv","description":"","etl":"","value":"","remark":""}'
,
click_search_uv
int
comment
'{"chs_name":"点击搜索或搜索框uv","description":"","etl":"","value":"","remark":""}'
)
comment
'分搜索入口的搜索点击数据'
PARTITIONED
BY
(
PARTITION_DAY
STRING
comment
'分区日期'
)
ROW
FORMAT
DELIMITED
FIELDS
TERMINATED
BY
'
\t
'
COLLECTION
ITEMS
TERMINATED
BY
'
\0
02'
MAP
KEYS
TERMINATED
BY
'
\0
03'
LINES
TERMINATED
BY
'
\n
'
STORED
AS
TEXTFILE
;
\ No newline at end of file
tables/create_search_input_type.sql
0 → 100644
View file @
957dae4a
--***************************************************************
--*脚本名称: create_pm_c_op_co_content_dimen_d.sql
--*功能: 内容日报
--*业务名称: pm
--*输入数据:
--*作者: weiyimin@igengmei.com
--*更新时间: 2020-5-25 11:00
--***************************************************************
--设置全局变量&UDF
SET
mapreduce
.
job
.
queuename
=
data
;
--使用bl数据库
USE
pm
;
--创建BL层内部表
CREATE
TABLE
IF
NOT
EXISTS
pm
.
tl_pm_search_input_type_d
(
day_id
string
comment
'{"chs_name":"当天日期","description":"","etl":"","value":"","remark":""}'
,
query
string
comment
'{"chs_name":"搜索词","description":"","etl":"","value":"","remark":""}'
,
input_type
string
comment
'{"chs_name":"搜索方式","description":"","etl":"","value":"","remark":""}'
,
search_pv
bigint
comment
'{"chs_name":"搜索量","description":"","etl":"","value":"","remark":""}'
)
comment
'分方式搜索日报'
PARTITIONED
BY
(
PARTITION_DAY
STRING
comment
'分区日期'
)
ROW
FORMAT
DELIMITED
FIELDS
TERMINATED
BY
'
\t
'
COLLECTION
ITEMS
TERMINATED
BY
'
\0
02'
MAP
KEYS
TERMINATED
BY
'
\0
03'
LINES
TERMINATED
BY
'
\n
'
STORED
AS
TEXTFILE
;
\ No newline at end of file
tables/create_search_result_click_rate.sql
0 → 100644
View file @
957dae4a
--***************************************************************
--*脚本名称: create_pm_c_op_co_content_dimen_d.sql
--*功能: 内容日报
--*业务名称: pm
--*输入数据:
--*作者: weiyimin@igengmei.com
--*更新时间: 2020-5-25 11:00
--***************************************************************
--设置全局变量&UDF
SET
mapreduce
.
job
.
queuename
=
data
;
--使用bl数据库
USE
pm
;
--创建BL层内部表
CREATE
TABLE
IF
NOT
EXISTS
pm
.
tl_pm_search_result_click_rate_d
(
day_id
string
comment
'{"chs_name":"当天日期","description":"","etl":"","value":"","remark":""}'
,
query
string
comment
'{"chs_name":"设备类型","description":"","etl":"","value":"","remark":""}'
,
search_pv
bigint
comment
'{"chs_name":"活跃类型","description":"","etl":"","value":"","remark":""}'
,
search_uv
bigint
comment
'{"chs_name":"搜索入口","description":"","etl":"","value":"","remark":""}'
,
search_more_pv
bigint
comment
'{"chs_name":"综合tab下的搜索的点击pv","description":"","etl":"","value":"","remark":""}'
,
page_more_pv
bigint
comment
'{"chs_name":"搜索综合结果页浏览pv","description":"","etl":"","value":"","remark":""}'
,
more_click_pv
bigint
comment
'{"chs_name":"搜索综合结果页内容卡片点击PV","description":"","etl":"","value":"","remark":""}'
,
more_click_10_pv
bigint
comment
'{"chs_name":"搜索综合结果页前10内容卡片点击PV","description":"","etl":"","value":"","remark":""}'
,
more_click_5_diary_pv
bigint
comment
'{"chs_name":"搜索综合结果页前5日记卡片点击PV","description":"","etl":"","value":"","remark":""}'
,
more_click_5_answer_pv
bigint
comment
'{"chs_name":"搜索综合结果页前5回答卡片点击PV","description":"","etl":"","value":"","remark":""}'
,
more_click_5_topic_pv
bigint
comment
'{"chs_name":"搜索综合结果页前5帖子卡片点击PV","description":"","etl":"","value":"","remark":""}'
,
search_wel_pv
bigint
comment
'{"chs_name":"美购tab下的搜索的点击pv","description":"","etl":"","value":"","remark":""}'
,
page_wel_pv
bigint
comment
'{"chs_name":"搜索美购结果页浏览pv","description":"","etl":"","value":"","remark":""}'
,
wel_click_pv
bigint
comment
'{"chs_name":"搜索美购结果页卡片点击PV","description":"","etl":"","value":"","remark":""}'
,
wel_click_10_pv
bigint
comment
'{"chs_name":"搜索美购结果页前10卡片点击PV","description":"","etl":"","value":"","remark":""}'
,
wel_click_5_pv
bigint
comment
'{"chs_name":"搜索美购结果页前5卡片点击PV","description":"","etl":"","value":"","remark":""}'
,
search_diary_pv
bigint
comment
'{"chs_name":"日记tab下的搜索的点击pv","description":"","etl":"","value":"","remark":""}'
,
page_diary_pv
bigint
comment
'{"chs_name":"搜索日记结果页浏览pv","description":"","etl":"","value":"","remark":""}'
,
diary_click_pv
bigint
comment
'{"chs_name":"搜索日记结果页卡片点击PV","description":"","etl":"","value":"","remark":""}'
,
diary_click_10_pv
bigint
comment
'{"chs_name":"搜索日记结果页前10卡片点击PV","description":"","etl":"","value":"","remark":""}'
,
diary_click_5_pv
bigint
comment
'{"chs_name":"搜索日记结果页前5卡片点击PV","description":"","etl":"","value":"","remark":""}'
,
search_more_uv
bigint
comment
'{"chs_name":"综合tab下的搜索的点击uv","description":"","etl":"","value":"","remark":""}'
,
page_more_uv
bigint
comment
'{"chs_name":"搜索综合结果页浏览uv","description":"","etl":"","value":"","remark":""}'
,
more_click_uv
bigint
comment
'{"chs_name":"搜索综合结果页内容卡片点击UV","description":"","etl":"","value":"","remark":""}'
,
more_click_10_uv
bigint
comment
'{"chs_name":"搜索综合结果页前10内容卡片点击UV","description":"","etl":"","value":"","remark":""}'
,
more_click_5_diary_uv
bigint
comment
'{"chs_name":"搜索综合结果页前5日记卡片点击UV","description":"","etl":"","value":"","remark":""}'
,
more_click_5_answer_uv
bigint
comment
'{"chs_name":"搜索综合结果页前5回答卡片点击UV","description":"","etl":"","value":"","remark":""}'
,
more_click_5_topic_uv
bigint
comment
'{"chs_name":"搜索综合结果页前5帖子卡片点击UV","description":"","etl":"","value":"","remark":""}'
,
search_wel_uv
bigint
comment
'{"chs_name":"美购tab下的搜索的点击uv","description":"","etl":"","value":"","remark":""}'
,
page_wel_uv
bigint
comment
'{"chs_name":"搜索美购结果页浏览uv","description":"","etl":"","value":"","remark":""}'
,
wel_click_uv
bigint
comment
'{"chs_name":"搜索美购结果页卡片点击UV","description":"","etl":"","value":"","remark":""}'
,
wel_click_10_uv
bigint
comment
'{"chs_name":"搜索美购结果页前10卡片点击UV","description":"","etl":"","value":"","remark":""}'
,
wel_click_5_uv
bigint
comment
'{"chs_name":"搜索美购结果页前5卡片点击UV","description":"","etl":"","value":"","remark":""}'
,
search_diary_uv
bigint
comment
'{"chs_name":"日记tab下的搜索的点击uv","description":"","etl":"","value":"","remark":""}'
,
page_diary_uv
bigint
comment
'{"chs_name":"搜索日记结果页浏览uv","description":"","etl":"","value":"","remark":""}'
,
diary_click_uv
bigint
comment
'{"chs_name":"搜索日记结果页卡片点击UV","description":"","etl":"","value":"","remark":""}'
,
diary_click_10_uv
bigint
comment
'{"chs_name":"搜索日记结果页前10卡片点击UV","description":"","etl":"","value":"","remark":""}'
,
diary_click_5_uv
bigint
comment
'{"chs_name":"搜索日记结果页前5卡片点击UV","description":"","etl":"","value":"","remark":""}'
)
comment
'分搜索词日报'
PARTITIONED
BY
(
PARTITION_DAY
STRING
comment
'分区日期'
)
ROW
FORMAT
DELIMITED
FIELDS
TERMINATED
BY
'
\t
'
COLLECTION
ITEMS
TERMINATED
BY
'
\0
02'
MAP
KEYS
TERMINATED
BY
'
\0
03'
LINES
TERMINATED
BY
'
\n
'
STORED
AS
TEXTFILE
;
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment