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
1f7ce98c
Commit
1f7ce98c
authored
Feb 27, 2019
by
王志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
拆分新老用户重复曝光指标
parent
0aa17ef8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
temp_count.scala
eda/feededa/src/main/scala/com/gmei/temp_count.scala
+8
-3
No files found.
eda/feededa/src/main/scala/com/gmei/temp_count.scala
View file @
1f7ce98c
...
...
@@ -307,6 +307,11 @@ object Repeated_content_recommendation {
println
(
all_new
)
val
repeated_rate_new
=
more_than2_new
/
all_new
.
toDouble
println
(
repeated_rate_new
)
val
result1
=
List
((
stat_date
,
more_than2_new
,
all_new
))
val
df1
=
sc
.
createDataFrame
(
result1
).
toDF
(
"stat_date"
,
"new_rep_count"
,
"new_imp_all"
)
GmeiConfig
.
writeToJDBCTable
(
df1
,
table
=
"Repeated_evaluation_indicator_new"
,
SaveMode
.
Append
)
val
exp_diary_old
=
sc
.
sql
(
s
"""
...
...
@@ -327,10 +332,10 @@ object Repeated_content_recommendation {
println
(
repeated_rate_old
)
val
result
=
List
((
stat_date
,
more_than2_new
,
all_new
,
more_than2_old
,
all_old
))
val
df
=
sc
.
createDataFrame
(
result
).
toDF
(
"stat_date"
,
"new_rep_count"
,
"new_imp_all
"
,
"old_rep_count"
,
"old_imp_all"
)
val
result
2
=
List
((
stat_date
,
more_than2_old
,
all_old
))
val
df
2
=
sc
.
createDataFrame
(
result2
).
toDF
(
"stat_date
"
,
"old_rep_count"
,
"old_imp_all"
)
GmeiConfig
.
writeToJDBCTable
(
df
,
table
=
"Repeated_evaluation_indicator
"
,
SaveMode
.
Append
)
GmeiConfig
.
writeToJDBCTable
(
df
2
,
table
=
"Repeated_evaluation_indicator_old
"
,
SaveMode
.
Append
)
// val temp=get_result.collect()
...
...
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