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
651f26a2
Commit
651f26a2
authored
Dec 19, 2018
by
高雅喆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change pre data from 1days to 7days
parent
49abaf24
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
EsmmData.scala
eda/feededa/src/main/scala/com/gmei/EsmmData.scala
+4
-4
No files found.
eda/feededa/src/main/scala/com/gmei/EsmmData.scala
View file @
651f26a2
...
@@ -273,7 +273,7 @@ object EsmmPredData {
...
@@ -273,7 +273,7 @@ object EsmmPredData {
import
sc.implicits._
import
sc.implicits._
val
yesteday_have_seq
=
GmeiConfig
.
getMinusNDate
(
1
)
val
yesteday_have_seq
=
GmeiConfig
.
getMinusNDate
(
7
)
//nearby_data
//nearby_data
val
raw_data
=
sc
.
sql
(
val
raw_data
=
sc
.
sql
(
...
@@ -284,7 +284,7 @@ object EsmmPredData {
...
@@ -284,7 +284,7 @@ object EsmmPredData {
|select device_id,city_id,native_queue as merge_queue from ffm_diary_queue
|select device_id,city_id,native_queue as merge_queue from ffm_diary_queue
|union
|union
|select device_id,city_id,search_queue as merge_queue from search_queue) as tmp1
|select device_id,city_id,search_queue as merge_queue from search_queue) as tmp1
|where tmp1.device_id in (select distinct device_id from data_feed_click where stat_date
=
'${yesteday_have_seq}')
|where tmp1.device_id in (select distinct device_id from data_feed_click where stat_date
>
'${yesteday_have_seq}')
"""
.
stripMargin
"""
.
stripMargin
)
)
raw_data
.
show
()
raw_data
.
show
()
...
@@ -314,7 +314,7 @@ object EsmmPredData {
...
@@ -314,7 +314,7 @@ object EsmmPredData {
s
"""
s
"""
|select distinct a.device_id,a.city_id,b.native_queue from data_feed_click a
|select distinct a.device_id,a.city_id,b.native_queue from data_feed_click a
|left join biz_feed_diary_queue b on a.city_id = b.city_id
|left join biz_feed_diary_queue b on a.city_id = b.city_id
|where a.stat_date
=
'${yesteday_have_seq}' and b.native_queue != ""
|where a.stat_date
>
'${yesteday_have_seq}' and b.native_queue != ""
"""
.
stripMargin
"""
.
stripMargin
)
)
native_data
.
createOrReplaceTempView
(
"native_data"
)
native_data
.
createOrReplaceTempView
(
"native_data"
)
...
@@ -345,7 +345,7 @@ object EsmmPredData {
...
@@ -345,7 +345,7 @@ object EsmmPredData {
//join feat
//join feat
val
yesteday
=
yesteday_have_seq
.
replace
(
"-"
,
""
)
val
yesteday
=
GmeiConfig
.
getMinusNDate
(
1
)
.
replace
(
"-"
,
""
)
val
sid_data
=
sc
.
sql
(
val
sid_data
=
sc
.
sql
(
s
"""
s
"""
|select distinct
|select distinct
...
...
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