Commit e591e3cf authored by 王志伟's avatar 王志伟

repair gug

parent 342687e6
...@@ -57,7 +57,7 @@ object Recommendation_strategy_all { ...@@ -57,7 +57,7 @@ object Recommendation_strategy_all {
import sc.implicits._ import sc.implicits._
// val stat_date = GmeiConfig.getMinusNDate(1) // val stat_date = GmeiConfig.getMinusNDate(1)
println(param.date) // println(param.date)
val partition_date = param.date.replace("-","") val partition_date = param.date.replace("-","")
val decive_id_oldUser = sc.sql( val decive_id_oldUser = sc.sql(
s""" s"""
...@@ -106,6 +106,7 @@ object Recommendation_strategy_all { ...@@ -106,6 +106,7 @@ object Recommendation_strategy_all {
) )
val result1 = clk_count_oldUser_experiment.join(imp_count_oldUser_experiment,"stat_date") val result1 = clk_count_oldUser_experiment.join(imp_count_oldUser_experiment,"stat_date")
result1.createOrReplaceTempView("temp1") result1.createOrReplaceTempView("temp1")
result1.show()
} else{ } else{
val clk_count_oldUser_all = sc.sql( val clk_count_oldUser_all = sc.sql(
s""" s"""
...@@ -134,6 +135,7 @@ object Recommendation_strategy_all { ...@@ -134,6 +135,7 @@ object Recommendation_strategy_all {
) )
val result2 = clk_count_oldUser_all.join(imp_count_oldUser_all,"stat_date") val result2 = clk_count_oldUser_all.join(imp_count_oldUser_all,"stat_date")
result2.createOrReplaceTempView("temp2") result2.createOrReplaceTempView("temp2")
result2.show()
} }
...@@ -141,17 +143,17 @@ object Recommendation_strategy_all { ...@@ -141,17 +143,17 @@ object Recommendation_strategy_all {
} }
val current_all = sc.sql( //val current_all = sc.sql(
s""" // 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 // |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 // |from temp1 join temp2
|on temp1.stat_date = temp2.stat_date // |on temp1.stat_date = temp2.stat_date
""".stripMargin // """.stripMargin
) //)
val result = current_all //val result = current_all
result.show() // result.show()
......
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