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
e98034c5
Commit
e98034c5
authored
Aug 19, 2020
by
赵建伟
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'weiyimin' into 'master'
push codes See merge request
!48
parents
40140e50
866d4528
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
21 deletions
+22
-21
clue_daily.sql
pm/clue_daily/etl/clue_daily.sql
+4
-4
clue_daily.zip
pm/clue_daily/job/clue_daily.zip
+0
-0
step1_13.job
pm/clue_daily/job/step1_13.job
+2
-2
step1_4.job
pm/clue_daily/job/step1_4.job
+2
-2
daily_recommend_strategy.sql
pm/daily_recommend_strategy/etl/daily_recommend_strategy.sql
+12
-12
home_recommend_strategy.sql
...ily_recommend_strategy/report/home_recommend_strategy.sql
+2
-1
No files found.
pm/clue_daily/etl/clue_daily.sql
View file @
e98034c5
...
...
@@ -660,7 +660,7 @@ LEFT JOIN
AND
REGEXP_REPLACE
(
SUBSTR
(
call_time
,
0
,
10
),
'-'
,
''
)
>=
REGEXP_REPLACE
(
trunc
(
date_sub
(
current_date
(),
1
),
'MM'
),
'-'
,
''
)
AND
REGEXP_REPLACE
(
SUBSTR
(
call_time
,
0
,
10
),
'-'
,
''
)
<=
regexp_replace
(
date_sub
(
current_date
(),
1
),
'-'
,
''
)
and
start_time
>
call_time
and
unix_timestamp
(
substr
(
start_time
,
1
,
19
))
+
30
<=
unix_timestamp
(
substr
(
release_time
,
1
,
19
))
and
start_time
<
release_time
)
a
LEFT
JOIN
(
...
...
@@ -798,7 +798,7 @@ LEFT JOIN
AND
REGEXP_REPLACE
(
SUBSTR
(
call_time
,
0
,
10
),
'-'
,
''
)
>=
REGEXP_REPLACE
(
trunc
(
date_sub
(
current_date
(),
1
),
'MM'
),
'-'
,
''
)
AND
REGEXP_REPLACE
(
SUBSTR
(
call_time
,
0
,
10
),
'-'
,
''
)
<=
regexp_replace
(
date_sub
(
current_date
(),
1
),
'-'
,
''
)
and
start_time
>
call_time
and
unix_timestamp
(
substr
(
start_time
,
1
,
19
))
+
30
<=
unix_timestamp
(
substr
(
release_time
,
1
,
19
))
and
start_time
<
release_time
)
a
LEFT
JOIN
(
...
...
@@ -951,7 +951,7 @@ LEFT JOIN
AND
REGEXP_REPLACE
(
SUBSTR
(
call_time
,
0
,
10
),
'-'
,
''
)
>=
REGEXP_REPLACE
(
trunc
(
date_sub
(
current_date
(),
1
),
'MM'
),
'-'
,
''
)
AND
REGEXP_REPLACE
(
SUBSTR
(
call_time
,
0
,
10
),
'-'
,
''
)
<=
regexp_replace
(
date_sub
(
current_date
(),
1
),
'-'
,
''
)
and
start_time
>
call_time
and
unix_timestamp
(
substr
(
start_time
,
1
,
19
))
+
30
<=
unix_timestamp
(
substr
(
release_time
,
1
,
19
))
and
start_time
<
release_time
)
a
LEFT
JOIN
(
...
...
@@ -1085,7 +1085,7 @@ LEFT JOIN
AND
REGEXP_REPLACE
(
SUBSTR
(
call_time
,
0
,
10
),
'-'
,
''
)
>=
REGEXP_REPLACE
(
trunc
(
date_sub
(
current_date
(),
1
),
'MM'
),
'-'
,
''
)
AND
REGEXP_REPLACE
(
SUBSTR
(
call_time
,
0
,
10
),
'-'
,
''
)
<=
regexp_replace
(
date_sub
(
current_date
(),
1
),
'-'
,
''
)
and
start_time
>
call_time
and
unix_timestamp
(
substr
(
start_time
,
1
,
19
))
+
30
<=
unix_timestamp
(
substr
(
release_time
,
1
,
19
))
and
start_time
<
release_time
)
a
LEFT
JOIN
(
...
...
pm/clue_daily/job/clue_daily.zip
View file @
e98034c5
No preview for this file type
pm/clue_daily/job/step1_13.job
View file @
e98034c5
#step1_13.job
type=command
command=sh /home/bi/bi-report/lib/shell/waitsuccess.sh hive ml mid_ml_c_ct_dv_device_inc_d
\ No newline at end of file
command=sh /home/bi/bi-report/lib/shell/waitsuccess.sh hive online ml_user_updates
\ No newline at end of file
pm/clue_daily/job/step1_4.job
View file @
e98034c5
#step1_3.job
type=command
command=sh /home/bi/bi-report/lib/shell/waitsuccess.sh hive ml ml_c_ct_ui_user_dimen_inc_d
\ 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
pm/daily_recommend_strategy/etl/daily_recommend_strategy.sql
View file @
e98034c5
...
...
@@ -37,7 +37,7 @@ FROM
WHEN
active_type
IN
(
'1'
,
'2'
)
THEN
'新增'
END
AS
active_type
,
device_id
FROM
online
.
ml_device_day_active_status
WHERE
partition_date
>=
'20200101'
and
partition_date
<
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
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'
...
...
@@ -71,7 +71,7 @@ FROM
card_id
,
app_session_id
from
online
.
ml_community_precise_exposure_detail
WHERE
partition_date
>=
'20200101'
and
partition_date
<
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
WHERE
partition_date
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
AND
action
in
(
'page_precise_exposure'
,
'home_choiceness_card_exposure'
)
--7745版本action改为page_precise_exposure
AND
is_exposure
=
'1'
----精准曝光
AND
page_name
=
'home'
...
...
@@ -119,7 +119,7 @@ FROM
params
[
'card_id'
]
as
card_id
,
app_session_id
from
online
.
bl_hdfs_maidian_updates
WHERE
partition_date
>=
'20200101'
and
partition_date
<
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
WHERE
partition_date
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
AND
action
=
'on_click_card'
AND
params
[
'page_name'
]
=
'home'
AND
params
[
'tab_name'
]
=
'精选'
...
...
@@ -155,7 +155,7 @@ FROM
when
page_name
in
(
'question_detail'
,
'answer_detail'
,
'question_answer_detail'
)
then
'qa'
else
null
end
as
page_name
,
sum
(
page_stay
)
as
page_stay
FROM
online
.
bl_hdfs_maidian_updates
WHERE
partition_date
>=
'20200101'
and
partition_date
<
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
WHERE
partition_date
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
AND
action
=
'page_view'
AND
page_name
IN
(
'diary_detail'
,
'topic_detail'
,
'post_detail'
,
'user_post_detail'
,
'doctor_post_detail'
,
'question_detail'
,
'answer_detail'
,
'question_answer_detail'
)
AND
referrer
=
'home'
...
...
@@ -177,7 +177,7 @@ FROM
when
page_name
in
(
'question_detail'
,
'answer_detail'
,
'question_answer_detail'
)
then
'qa'
else
null
end
as
page_name
,
count
(
1
)
as
navbar_pv
FROM
online
.
bl_hdfs_maidian_updates
WHERE
partition_date
>=
'20200101'
and
partition_date
<
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
WHERE
partition_date
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
AND
action
in
(
'on_click_navbar_search'
,
'do_search'
)
AND
page_name
IN
(
'diary_detail'
,
'topic_detail'
,
'post_detail'
,
'user_post_detail'
,
'doctor_post_detail'
,
'question_detail'
,
'answer_detail'
,
'question_answer_detail'
)
AND
(
referrer
=
'home'
or
...
...
@@ -200,7 +200,7 @@ FROM
when
page_name
in
(
'question_detail'
,
'answer_detail'
,
'question_answer_detail'
)
then
'qa'
else
null
end
as
page_name
,
count
(
1
)
as
highlight_pv
FROM
online
.
bl_hdfs_maidian_updates
WHERE
partition_date
>=
'20200101'
and
partition_date
<
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
WHERE
partition_date
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
AND
action
=
'on_click_card'
and
params
[
'card_type'
]
=
'highlight_word'
AND
page_name
IN
(
'diary_detail'
,
'topic_detail'
,
'post_detail'
,
'user_post_detail'
,
'doctor_post_detail'
,
'question_detail'
,
'answer_detail'
,
'question_answer_detail'
)
...
...
@@ -227,7 +227,7 @@ FROM
when
page_name
in
(
'question_detail'
,
'answer_detail'
,
'question_answer_detail'
)
then
'qa'
else
null
end
as
page_name
,
count
(
1
)
as
pv
FROM
online
.
bl_hdfs_maidian_updates
WHERE
partition_date
>=
'20200101'
and
partition_date
<
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
WHERE
partition_date
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
AND
(
get_json_object
(
params
[
'extra_param'
],
'$.type'
)
=
'交互栏'
or
get_json_object
(
params
[
'extra_param'
],
'$.jump_from'
)
=
'msg_link'
or
params
[
'in_page_pos'
]
=
'top'
...
...
@@ -261,7 +261,7 @@ FROM
when
page_name
in
(
'question_detail'
,
'answer_detail'
,
'question_answer_detail'
)
then
'qa'
else
null
end
as
page_name
,
count
(
1
)
as
service_pv
FROM
online
.
bl_hdfs_maidian_updates
WHERE
partition_date
>=
'20200101'
and
partition_date
<
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
WHERE
partition_date
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
AND
(
action
=
'on_click_card'
and
params
[
'card_content_type'
]
=
'service'
or
action
=
'on_click_button'
and
params
[
'button_name'
]
=
'unfold'
and
page_name
in
(
'diary_detail'
,
'topic_detail'
,
'post_detail'
,
'user_post_detail'
,
'doctor_post_detail'
)
or
action
=
'on_click_button'
and
params
[
'button_name'
]
=
'more_recommendations'
)
...
...
@@ -291,7 +291,7 @@ FROM
when
page_name
in
(
'question_detail'
,
'answer_detail'
,
'question_answer_detail'
)
then
'qa'
else
null
end
as
page_name
,
count
(
1
)
as
service_pv
FROM
online
.
bl_hdfs_maidian_updates
WHERE
partition_date
>=
'20200101'
and
partition_date
<
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
WHERE
partition_date
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
AND
action
=
'on_click_card'
and
params
[
'card_content_type'
]
in
(
'qa'
,
'diary'
,
'user_post'
,
'answer'
)
AND
page_name
IN
(
'diary_detail'
,
'topic_detail'
,
'post_detail'
,
'user_post_detail'
,
'doctor_post_detail'
,
'question_detail'
,
'answer_detail'
,
'question_answer_detail'
)
...
...
@@ -317,7 +317,7 @@ FROM
when
page_name
in
(
'question_detail'
,
'answer_detail'
,
'question_answer_detail'
)
then
'qa'
else
null
end
as
page_name
,
count
(
1
)
as
video_pv
FROM
online
.
bl_hdfs_maidian_updates
WHERE
partition_date
>=
'20200101'
and
partition_date
<
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
WHERE
partition_date
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
AND
action
=
'on_click_button'
and
params
[
'button_name'
]
=
'video_interview'
AND
page_name
IN
(
'diary_detail'
,
'topic_detail'
,
'post_detail'
,
'user_post_detail'
,
'doctor_post_detail'
,
'question_detail'
,
'answer_detail'
,
'question_answer_detail'
)
...
...
@@ -341,7 +341,7 @@ FROM
when
page_name
in
(
'question_detail'
,
'answer_detail'
,
'question_answer_detail'
)
then
'qa'
else
null
end
as
page_name
,
count
(
1
)
as
referral_pv
FROM
online
.
bl_hdfs_maidian_updates
WHERE
partition_date
>=
'20200101'
and
partition_date
<
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
WHERE
partition_date
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
AND
action
=
'on_click_button'
and
params
[
'button_name'
]
=
'referral'
AND
page_name
IN
(
'diary_detail'
,
'topic_detail'
,
'post_detail'
,
'user_post_detail'
,
'doctor_post_detail'
,
'question_detail'
,
'answer_detail'
,
'question_answer_detail'
)
...
...
@@ -377,7 +377,7 @@ FROM
SELECT
user_id
,
partition_date
,
if
(
size
(
device_list
)
>
0
,
device_list
[
0
],
''
)
AS
device_id
FROM
online
.
ml_user_updates
WHERE
partition_date
>=
'20200101'
and
partition_date
<
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
WHERE
partition_date
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
)
t1
JOIN
(
--医生账号
...
...
pm/daily_recommend_strategy/report/home_recommend_strategy.sql
View file @
e98034c5
...
...
@@ -19,5 +19,5 @@ SELECT
-- '未配置' as `来自I的推荐专题点击pv`,
transfer_card
as
`来自I的转诊点击pv`
,
video_consultation
as
`来自I的视频面诊点击pv`
FROM
pm
.
tl_pm_recommend_strategy_d
WHERE
partition_day
>=
'20200
62
7'
and
partition_day
<=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
WHERE
partition_day
>=
'20200
81
7'
and
partition_day
<=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
order
by
`日期`
desc
,
`设备类型`
,
`活跃类型`
,
`卡片类型`
,
`推荐类型`
;
\ 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