Commit 0e597661 authored by 王志伟's avatar 王志伟

新统计指标

parent ccac05f8
...@@ -86,6 +86,7 @@ object testt { ...@@ -86,6 +86,7 @@ object testt {
|and ou.cl_id not in (select device_id from blacklist) |and ou.cl_id not in (select device_id from blacklist)
""".stripMargin """.stripMargin
) )
diary_meigou_count.show()
//2.日记本点击数 //2.日记本点击数
val diary_clk = sc.sql( val diary_clk = sc.sql(
...@@ -100,6 +101,7 @@ object testt { ...@@ -100,6 +101,7 @@ object testt {
|and ov.cl_id not in (select device_id from blacklist) |and ov.cl_id not in (select device_id from blacklist)
""".stripMargin """.stripMargin
) )
diary_clk.show()
//3.日记本曝光数 //3.日记本曝光数
val diary_expoure=sc.sql( val diary_expoure=sc.sql(
...@@ -114,6 +116,7 @@ object testt { ...@@ -114,6 +116,7 @@ object testt {
|and od.cl_id not in (select device_id from blacklist) |and od.cl_id not in (select device_id from blacklist)
""".stripMargin """.stripMargin
) )
diary_expoure.show()
//4.搜索次数统计 //4.搜索次数统计
val search_count = sc.sql( val search_count = sc.sql(
...@@ -127,6 +130,7 @@ object testt { ...@@ -127,6 +130,7 @@ object testt {
|and ov.cl_id not in (select device_id from blacklist) |and ov.cl_id not in (select device_id from blacklist)
""".stripMargin """.stripMargin
) )
search_count.show()
//5.登录人数 //5.登录人数
...@@ -140,13 +144,14 @@ object testt { ...@@ -140,13 +144,14 @@ object testt {
|and oe.device_id not in (select device_id from blacklist) |and oe.device_id not in (select device_id from blacklist)
""".stripMargin """.stripMargin
) )
log_num.show()
val result = diary_meigou_count.join(diary_clk,"stat_date") val result = diary_meigou_count.join(diary_clk,"stat_date")
.join(diary_expoure,"stat_date") .join(diary_expoure,"stat_date")
.join(search_count,"stat_date") .join(search_count,"stat_date")
.join(log_num,"stat_date") .join(log_num,"stat_date")
GmeiConfig.writeToJDBCTable(result, "diary_meigou_crv", SaveMode.Overwrite) GmeiConfig.writeToJDBCTable(result, "diary_meigou_crv", SaveMode.Append)
} }
......
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