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
f1389a60
Commit
f1389a60
authored
Jun 10, 2019
by
王志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加新埋点
parent
37468234
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
2 deletions
+26
-2
data_feed_exposure_precise.scala
.../src/main/scala/com/gmei/data_feed_exposure_precise.scala
+26
-2
No files found.
eda/feededa/src/main/scala/com/gmei/data_feed_exposure_precise.scala
View file @
f1389a60
...
...
@@ -483,7 +483,7 @@ object icon_train_data {
val
partition_date
=
stat_date
.
replace
(
"-"
,
""
)
//日记本点击数据
val
diary_click
=
sc
.
sql
(
val
diary_click
_1
=
sc
.
sql
(
s
"""
|select cl_id as device_id, params['diary_id'] as diary_id
|from online.tl_hdfs_maidian_view
...
...
@@ -492,9 +492,33 @@ object icon_train_data {
|and params['diary_id'] is not null
"""
.
stripMargin
)
diary_click
.
show
()
diary_click_1
.
createOrReplaceTempView
(
"diary_click_1"
)
val
diary_click_2
=
sc
.
sql
(
s
"""
|select cl_id as device_id, params['card_id'] as diary_id
|from online.tl_hdfs_maidian_view
|where action = 'on_click_card'
|and params['card_content_type']='diary'
|and partition_date='${partition_date}'
|and params['card_id'] is not null
"""
.
stripMargin
)
diary_click_2
.
createOrReplaceTempView
(
"diary_click_2"
)
val
diary_click
=
sc
.
sql
(
s
"""
|select *
|from diary_click_1
|union all
|select *
|from diary_click_2
"""
.
stripMargin
)
diary_click
.
createOrReplaceTempView
(
"diary_click"
)
val
diary_tags
=
sc
.
sql
(
s
"""
|select * from online.tl_hdfs_diary_tags_view
...
...
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