Commit cd4b1acb authored by 张彦钊's avatar 张彦钊

Merge branch 'master' of git.wanmeizhensuo.com:ML/ffm-baseline

修改选取数据表
parents 7759df17 930f74e8
......@@ -119,9 +119,18 @@ object WeafareStat {
)
txt_clk_count.show()
val video_count = sc.sql(
s"""
|select '${stat_date}' as stat_date,count(distinct(cid)) as video_count
|from diary_video where stat_date='${stat_date}'
""".stripMargin
)
video_count.show()
val result = video_clk_count.join(video_meigou_count,"stat_date")
.join(txt_clk_count,"stat_date")
.join(txt_meigou_count,"stat_date")
.join(video_count,"stat_date")
val result1 = result.withColumn("video_rate",result.col("video_meigou_count")/result.col("video_clk_count"))
val result2 = result1.withColumn("txt_rate",result.col("txt_meigou_count")/result.col("txt_clk_count"))
......
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