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
61840c1f
Commit
61840c1f
authored
Jun 12, 2019
by
王志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
统计icon数据
parent
8f983d69
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
0 deletions
+52
-0
data_feed_exposure_precise.scala
.../src/main/scala/com/gmei/data_feed_exposure_precise.scala
+52
-0
No files found.
eda/feededa/src/main/scala/com/gmei/data_feed_exposure_precise.scala
View file @
61840c1f
...
...
@@ -1080,6 +1080,58 @@ object icon_data {
device_id
.
createTempView
(
"device_id"
)
//总体点击
val
icon_click_all
=
sc
.
sql
(
s
"""
|select count(*) as icon_click_num
|from online.tl_hdfs_maidian_view
|where partition_date='${partition_date}'
|and action='home_click_section'
"""
.
stripMargin
)
icon_click_all
.
createOrReplaceTempView
(
"icon_click_all"
)
icon_click_all
.
show
()
//总体曝光
val
icon_expoure_all
=
sc
.
sql
(
s
"""
|select count(*) as icon_expoure_num
|from online.ml_community_exposure_detail_new
|where partition_date='${partition_date}'
|and business_type='icon'
"""
.
stripMargin
)
icon_expoure_all
.
createOrReplaceTempView
(
"icon_expoure_all"
)
icon_expoure_all
.
show
()
//指定用户的点击
val
icon_click_device
=
sc
.
sql
(
s
"""
|select count(*) as icon_click_num_device
|from online.tl_hdfs_maidian_view a
|inner join device_id b
|on a.cl_id=b.device_id
|where a.partition_date='${partition_date}'
|and a.action='home_click_section'
"""
.
stripMargin
)
icon_click_all
.
createOrReplaceTempView
(
"icon_click_all"
)
icon_click_device
.
show
()
//指定用户的曝光
val
icon_expoure_device
=
sc
.
sql
(
s
"""
|select count(*) as icon_expoure_num_device
|from online.ml_community_exposure_detail_new a
|inner join device_id b
|on a.cl_id=b.device_id
|where a.partition_date='${partition_date}'
|and a.business_type='icon'
"""
.
stripMargin
)
icon_expoure_all
.
createOrReplaceTempView
(
"icon_expoure_all"
)
icon_expoure_device
.
show
()
}
...
...
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