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
e591e3cf
Commit
e591e3cf
authored
Nov 09, 2018
by
王志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
repair gug
parent
342687e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
Recommendation_strategy_all.scala
...src/main/scala/com/gmei/Recommendation_strategy_all.scala
+12
-10
No files found.
eda/feededa/src/main/scala/com/gmei/Recommendation_strategy_all.scala
View file @
e591e3cf
...
...
@@ -57,7 +57,7 @@ object Recommendation_strategy_all {
import
sc.implicits._
// val stat_date = GmeiConfig.getMinusNDate(1)
println
(
param
.
date
)
//
println(param.date)
val
partition_date
=
param
.
date
.
replace
(
"-"
,
""
)
val
decive_id_oldUser
=
sc
.
sql
(
s
"""
...
...
@@ -106,6 +106,7 @@ object Recommendation_strategy_all {
)
val
result1
=
clk_count_oldUser_experiment
.
join
(
imp_count_oldUser_experiment
,
"stat_date"
)
result1
.
createOrReplaceTempView
(
"temp1"
)
result1
.
show
()
}
else
{
val
clk_count_oldUser_all
=
sc
.
sql
(
s
"""
...
...
@@ -134,6 +135,7 @@ object Recommendation_strategy_all {
)
val
result2
=
clk_count_oldUser_all
.
join
(
imp_count_oldUser_all
,
"stat_date"
)
result2
.
createOrReplaceTempView
(
"temp2"
)
result2
.
show
()
}
...
...
@@ -141,17 +143,17 @@ object Recommendation_strategy_all {
}
val
current_all
=
sc
.
sql
(
s
"""
|select temp1.stat_date,temp1.clk_count_oldUser_experiment,temp1.imp_count_oldUser_experiment,temp2.clk_count_oldUser_all,temp2.imp_count_oldUser_all
|from temp1 join temp2
|on temp1.stat_date = temp2.stat_date
"""
.
stripMargin
)
//
val current_all = sc.sql(
//
s"""
//
|select temp1.stat_date,temp1.clk_count_oldUser_experiment,temp1.imp_count_oldUser_experiment,temp2.clk_count_oldUser_all,temp2.imp_count_oldUser_all
//
|from temp1 join temp2
//
|on temp1.stat_date = temp2.stat_date
//
""".stripMargin
//
)
val
result
=
current_all
result
.
show
()
//
val result = current_all
//
result.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