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
c7124681
Commit
c7124681
authored
Dec 10, 2018
by
王志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
区别新老客户
parent
84a6523d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
testt.scala
eda/feededa/src/main/scala/com/gmei/testt.scala
+5
-5
No files found.
eda/feededa/src/main/scala/com/gmei/testt.scala
View file @
c7124681
...
@@ -168,7 +168,7 @@ object testt {
...
@@ -168,7 +168,7 @@ object testt {
//2.日记本点击数
//2.日记本点击数
val
diary_clk_device
=
sc
.
sql
(
val
diary_clk_device
=
sc
.
sql
(
s
"""
s
"""
|select cl_id as device_id
|select
ov.
cl_id as device_id
|from online.tl_hdfs_maidian_view ov left join agency_id
|from online.tl_hdfs_maidian_view ov left join agency_id
|on ov.cl_id = agency_id.device_id
|on ov.cl_id = agency_id.device_id
|where ov.action = 'on_click_diary_card'
|where ov.action = 'on_click_diary_card'
...
@@ -215,7 +215,7 @@ object testt {
...
@@ -215,7 +215,7 @@ object testt {
//3.日记本曝光数
//3.日记本曝光数
val
diary_expoure_device
=
sc
.
sql
(
val
diary_expoure_device
=
sc
.
sql
(
s
"""
s
"""
|select cl_id as device_id
|select
od.
cl_id as device_id
|from online.ml_community_exposure_detail od left join agency_id
|from online.ml_community_exposure_detail od left join agency_id
|on od.cl_id = agency_id.device_id
|on od.cl_id = agency_id.device_id
|where od.business_type = "diary"
|where od.business_type = "diary"
...
@@ -262,13 +262,13 @@ object testt {
...
@@ -262,13 +262,13 @@ object testt {
//4.搜索次数统计
//4.搜索次数统计
val
search_device
=
sc
.
sql
(
val
search_device
=
sc
.
sql
(
s
"""
s
"""
|select cl_id as device_id
|select
ov.
cl_id as device_id
|from online.tl_hdfs_maidian_view ov left join agency_id
|from online.tl_hdfs_maidian_view ov left join agency_id
|on ov.cl_id = agency_id.device_id
|on ov.cl_id = agency_id.device_id
|where (ov.action = 'do_search' or ov.action = 'search_result_click_search')
|where (ov.action = 'do_search' or ov.action = 'search_result_click_search')
|and ov.partition_date ='${partition_date}'
|and ov.partition_date ='${partition_date}'
|and agency_id.device_id is null
|and agency_id.device_id is null
|and ov.cl_id
not in (select device_id from blacklist)
|and ov.cl_id not in (select device_id from blacklist)
"""
.
stripMargin
"""
.
stripMargin
)
)
search_device
.
createOrReplaceTempView
(
"search_device"
)
search_device
.
createOrReplaceTempView
(
"search_device"
)
...
@@ -294,7 +294,7 @@ object testt {
...
@@ -294,7 +294,7 @@ object testt {
//5.登录人数
//5.登录人数
val
log_device
=
sc
.
sql
(
val
log_device
=
sc
.
sql
(
s
"""
s
"""
|select distinct(device_id) as log_device
|select distinct(
oe.
device_id) as log_device
|from data_feed_exposure oe left join agency_id
|from data_feed_exposure oe left join agency_id
|on oe.device_id = agency_id.device_id
|on oe.device_id = agency_id.device_id
|and oe.stat_date ='${stat_date}'
|and oe.stat_date ='${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