Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
ffm-baseline
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ML
ffm-baseline
Commits
c84cd635
Commit
c84cd635
authored
Nov 21, 2018
by
王志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改统计参数
parent
e5720856
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
app_list.scala
eda/feededa/src/main/scala/com/gmei/app_list.scala
+9
-9
No files found.
eda/feededa/src/main/scala/com/gmei/app_list.scala
View file @
c84cd635
...
...
@@ -192,7 +192,7 @@ object coincidence_xinyang {
println
(
pre_monthday
)
//获取截止目前获得应用列表的用户的device_id
val
all_device_id
=
sc
.
sql
(
/*
val all_device_id = sc.sql(
s"""
|select distinct(cl_id) as device_id
|from online.tl_hdfs_maidian_view
...
...
@@ -201,10 +201,10 @@ object coincidence_xinyang {
|and cl_id not in (select device_id from bl_device_list)
|and cl_id not in (select device_id from blacklist)
""".stripMargin
)
.
repartition
(
100
)
)
all_device_id.createOrReplaceTempView("all_device_id")
*/
//获取每日活跃用户中与新氧重合用户占比
//1.每日活跃中与新氧重合用户数
val
data
=
yesterday
.
replace
(
"-"
,
""
)
...
...
@@ -214,7 +214,7 @@ object coincidence_xinyang {
|from device_id_coincidence
|where stat_date = '${data}'
"""
.
stripMargin
)
.
repartition
(
100
)
)
//2.获得应用列表的每日活跃总用户数
val
yesterday_expoure_num
=
sc
.
sql
(
s
"""
...
...
@@ -225,7 +225,7 @@ object coincidence_xinyang {
|and cl_id not in (select device_id from bl_device_list)
|and cl_id not in (select device_id from blacklist)
"""
.
stripMargin
)
.
repartition
(
100
)
)
//获取每周活跃用户中与新氧重合用户占比
...
...
@@ -237,7 +237,7 @@ object coincidence_xinyang {
|from device_id_coincidence
|where stat_date >= '${week_day}'
"""
.
stripMargin
)
.
repartition
(
100
)
)
//2.获得应用列表的每周活跃总用户
val
week_expoure_num
=
sc
.
sql
(
s
"""
...
...
@@ -248,7 +248,7 @@ object coincidence_xinyang {
|and cl_id not in (select device_id from bl_device_list)
|and cl_id not in (select device_id from blacklist)
"""
.
stripMargin
)
.
repartition
(
100
)
)
//获取每月活跃用户中与新氧用户重合用户占比
//1.0 每月活跃中与新氧用户重合用户数
...
...
@@ -259,7 +259,7 @@ object coincidence_xinyang {
|from device_id_coincidence
|where stat_date > '${month_day}'
"""
.
stripMargin
)
.
repartition
(
100
)
)
//2.0 获得应用列表的每月活跃总用户
val
month_expoure_num
=
sc
.
sql
(
s
"""
...
...
@@ -270,7 +270,7 @@ object coincidence_xinyang {
|and cl_id not in (select device_id from bl_device_list)
|and cl_id not in (select device_id from blacklist)
"""
.
stripMargin
)
.
repartition
(
100
)
)
val
result
=
yesterday_coincidence
.
join
(
yesterday_expoure_num
,
"stat_date"
)
.
join
(
week_coincidence
,
"stat_date"
)
...
...
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