Commit 1f7ce98c authored by 王志伟's avatar 王志伟

拆分新老用户重复曝光指标

parent 0aa17ef8
...@@ -307,6 +307,11 @@ object Repeated_content_recommendation { ...@@ -307,6 +307,11 @@ object Repeated_content_recommendation {
println(all_new) println(all_new)
val repeated_rate_new= more_than2_new / all_new.toDouble val repeated_rate_new= more_than2_new / all_new.toDouble
println(repeated_rate_new) 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( val exp_diary_old = sc.sql(
s""" s"""
...@@ -327,10 +332,10 @@ object Repeated_content_recommendation { ...@@ -327,10 +332,10 @@ object Repeated_content_recommendation {
println(repeated_rate_old) println(repeated_rate_old)
val result=List((stat_date,more_than2_new,all_new,more_than2_old,all_old)) val result2=List((stat_date,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 df2 = sc.createDataFrame(result2).toDF("stat_date","old_rep_count","old_imp_all")
GmeiConfig.writeToJDBCTable(df, table = "Repeated_evaluation_indicator", SaveMode.Append) GmeiConfig.writeToJDBCTable(df2, table = "Repeated_evaluation_indicator_old", SaveMode.Append)
// val temp=get_result.collect() // val temp=get_result.collect()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment