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
2042d251
Commit
2042d251
authored
Jul 10, 2020
by
魏艺敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push codes
parent
50c49eea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
daily_push.sql
pm/daily_push/etl/daily_push.sql
+4
-4
daily_recommend_strategy.sql
pm/daily_recommend_strategy/etl/daily_recommend_strategy.sql
+0
-2
No files found.
pm/daily_push/etl/daily_push.sql
View file @
2042d251
...
...
@@ -35,10 +35,10 @@ SELECT t1.partition_date as day_id
,
sum
(
NVL
(
t2
.
sign_push_open_pv
,
0
))
as
sign_push_open_pv
--签到push拉起人次
,
count
(
distinct
case
when
sign_push_open_2_pv
is
not
null
and
sign_push_open_2_pv
>
0
then
t5
.
cl_id
end
)
as
sign_push_open_2_uv
--签到push拉起有2跳设备数
,
sum
(
NVL
(
t5
.
sign_push_open_2_pv
,
0
))
as
sign_push_open_2_pv
,
count
(
distinct
case
when
t2
.
ctr_push_open_pv
+
t2
.
non_ctr_push_open_pv
>
0
then
t2
.
cl_id
end
)
as
personal_push_open_uv
--个性化push拉起设备数
,
sum
(
NVL
(
t2
.
ctr_push_open_pv
+
t2
.
non_ctr_push_open_pv
,
0
))
as
personal_push_open_pv
--个性化push拉起人次
,
count
(
distinct
case
when
t5
.
ctr_push_open_2_pv
+
t5
.
non_ctr_push_open_2_pv
>
0
then
t5
.
cl_id
end
)
as
personal_push_open_2_uv
--个性化push拉起设备数
,
sum
(
NVL
(
t5
.
ctr_push_open_2_pv
+
t5
.
non_ctr_push_open_2_pv
,
0
))
as
personal_push_open_2_pv
--个性化push拉起有2跳人次
,
count
(
distinct
case
when
t2
.
ctr_push_open_pv
+
t2
.
non_ctr_push_open_pv
+
t2
.
will_push_open_pv
>
0
then
t2
.
cl_id
end
)
as
personal_push_open_uv
--个性化push拉起设备数
,
sum
(
NVL
(
t2
.
ctr_push_open_pv
+
t2
.
non_ctr_push_open_pv
+
t2
.
will_push_open_pv
,
0
))
as
personal_push_open_pv
--个性化push拉起人次
,
count
(
distinct
case
when
t5
.
ctr_push_open_2_pv
+
t5
.
non_ctr_push_open_2_pv
+
t5
.
will_push_open_2_pv
>
0
then
t5
.
cl_id
end
)
as
personal_push_open_2_uv
--个性化push拉起设备数
,
sum
(
NVL
(
t5
.
ctr_push_open_2_pv
+
t5
.
non_ctr_push_open_2_pv
+
t5
.
will_push_open_2_pv
,
0
))
as
personal_push_open_2_pv
--个性化push拉起有2跳人次
,
count
(
distinct
case
when
ctr_push_open_pv
is
not
null
and
ctr_push_open_pv
>
0
then
t2
.
cl_id
end
)
as
ctr_push_open_uv
--签到push拉起设备数
,
sum
(
NVL
(
t2
.
ctr_push_open_pv
,
0
))
as
ctr_push_open_pv
--签到push拉起人次
,
count
(
distinct
case
when
ctr_push_open_2_pv
is
not
null
and
ctr_push_open_2_pv
>
0
then
t5
.
cl_id
end
)
as
ctr_push_open_2_uv
--签到push拉起有2跳设备数
...
...
pm/daily_recommend_strategy/etl/daily_recommend_strategy.sql
View file @
2042d251
...
...
@@ -8,8 +8,6 @@ SET mapred.reduce.tasks=20;
SET
role
admin
;
ADD
JAR
hdfs
:
///
user
/
hive
/
share
/
lib
/
udf
/
hive
-
udf
-
1
.
0
-
SNAPSHOT
.
jar
;
CREATE
TEMPORARY
FUNCTION
convup
AS
'com.gmei.hive.common.udf.UDFConvUpgrade'
;
INSERT
OVERWRITE
TABLE
pm
.
tl_pm_recommend_strategy_d
PARTITION
(
PARTITION_DAY
=
${
partition_day
}
)
SELECT
...
...
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