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
06d3a0ba
Commit
06d3a0ba
authored
Jun 06, 2019
by
Your Name
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.wanmeizhensuo.com:ML/ffm-baseline
parents
ab8705af
06db23ba
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
+17
-9
data_feed_exposure_precise.scala
.../src/main/scala/com/gmei/data_feed_exposure_precise.scala
+17
-9
No files found.
eda/feededa/src/main/scala/com/gmei/data_feed_exposure_precise.scala
View file @
06d3a0ba
...
@@ -485,11 +485,14 @@ object icon_train_data {
...
@@ -485,11 +485,14 @@ object icon_train_data {
//日记本点击数据
//日记本点击数据
val
diary_click
=
sc
.
sql
(
val
diary_click
=
sc
.
sql
(
s
"""
s
"""
|select cl_id as device_id, params['diary_id'] as diary_id
|select cl_id as device_id,
|if(action='on_click_diary_card',params['diary_id'],
|if(action='on_click_card' and params['card_content_type']='diary',params['card_id']
|)) as diary_id
|from online.tl_hdfs_maidian_view
|from online.tl_hdfs_maidian_view
|where action
= 'on_click_diary_card'
|where action
in ('on_click_diary_card','on_click_card')
|and partition_date='${partition_date}'
|and partition_date='${partition_date}'
|and
params['diary_id'] is not null
|and
(params['diary_id'] is not null) or (params['card_id'] is not null)
"""
.
stripMargin
"""
.
stripMargin
)
)
diary_click
.
show
()
diary_click
.
show
()
...
@@ -530,11 +533,14 @@ object icon_train_data {
...
@@ -530,11 +533,14 @@ object icon_train_data {
val
meigou_click
=
sc
.
sql
(
val
meigou_click
=
sc
.
sql
(
s
"""
s
"""
|select cl_id as device_id, params['service_id'] as service_id
|select cl_id as device_id,
|if(action='goto_welfare_detail',params['service_id'],
|if(action='on_click_card' and params['card_content_type']='service',params['card_id']
|))as service_id
|from online.tl_hdfs_maidian_view
|from online.tl_hdfs_maidian_view
|where action
= 'goto_welfare_detail'
|where action
in ('goto_welfare_detail','on_click_card')
|and partition_date='${partition_date}'
|and partition_date='${partition_date}'
|and
params['service_id'] is not null
|and
(params['service_id'] is not null) or (params['card_id'] is not null)
"""
.
stripMargin
"""
.
stripMargin
)
)
meigou_click
.
show
()
meigou_click
.
show
()
...
@@ -631,7 +637,7 @@ object icon_train_data {
...
@@ -631,7 +637,7 @@ object icon_train_data {
|SELECT cl_id as device_id,params['business_id'] as wiki_id
|SELECT cl_id as device_id,params['business_id'] as wiki_id
|from online.tl_hdfs_maidian_view
|from online.tl_hdfs_maidian_view
|where partition_date='${partition_date}'
|where partition_date='${partition_date}'
|and
(action='Search_result_wiki_click_item' or action='search_result_click_infomation_item' or action=
'search_result_wiki_click_recommend_wiki')
|and
action in ('Search_result_wiki_click_item','search_result_click_infomation_item',
'search_result_wiki_click_recommend_wiki')
"""
.
stripMargin
"""
.
stripMargin
)
)
wiki_click
.
createOrReplaceTempView
(
"wiki_click"
)
wiki_click
.
createOrReplaceTempView
(
"wiki_click"
)
...
@@ -902,7 +908,7 @@ object app_list_yunying {
...
@@ -902,7 +908,7 @@ object app_list_yunying {
| ,'TF-toufang5','tf-toufang1','tf-toufang2','tf-toufang3','tf-toufang4','tf-toufang5','benzhan','promotion_aso100'
| ,'TF-toufang5','tf-toufang1','tf-toufang2','tf-toufang3','tf-toufang4','tf-toufang5','benzhan','promotion_aso100'
| ,'promotion_qianka','promotion_xiaoyu','promotion_dianru','promotion_malioaso','promotion_malioaso-shequ'
| ,'promotion_qianka','promotion_xiaoyu','promotion_dianru','promotion_malioaso','promotion_malioaso-shequ'
| ,'promotion_shike','promotion_julang_jl03','','unknown','promotion_zuimei')
| ,'promotion_shike','promotion_julang_jl03','','unknown','promotion_zuimei')
|and partition_date ='20190
531
'
|and partition_date ='20190
430
'
"""
.
stripMargin
"""
.
stripMargin
)
)
device_id_newUser
.
createOrReplaceTempView
(
"device_id_new"
)
device_id_newUser
.
createOrReplaceTempView
(
"device_id_new"
)
...
@@ -912,11 +918,13 @@ object app_list_yunying {
...
@@ -912,11 +918,13 @@ object app_list_yunying {
|select *
|select *
|from
|from
|(select cl_id,
|(select cl_id,
| channel,
| time_stamp,
| time_stamp,
| params['installed_app_info'] as app_list,
| params['installed_app_info'] as app_list,
| row_number() over (partition by cl_id order by time_stamp desc) as pk
| row_number() over (partition by cl_id order by time_stamp desc) as pk
| from online.tl_hdfs_maidian_view
| from online.tl_hdfs_maidian_view
|where partition_date >='20190501'
|where partition_date <'20190501'
| and partition_date >='20190401'
| and action = 'user_installed_all_app_info'
| and action = 'user_installed_all_app_info'
| and cl_type='android'
| and cl_type='android'
| ) a
| ) a
...
...
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