Commit 04b2408d authored by 王志伟's avatar 王志伟

新统计

parent 7328579c
...@@ -65,20 +65,23 @@ object testt { ...@@ -65,20 +65,23 @@ object testt {
// ) // )
//// agency_id.show() //// agency_id.show()
// agency_id.createOrReplaceTempView("agency_id") // agency_id.createOrReplaceTempView("agency_id")
val a = Array("message_home","my_favor","my_order","order_detail","organization_detail","other_homepage")
for (i <- 0 until a.length){
val diary_pv = sc.sql( val diary_pv = sc.sql(
s""" s"""
|select partition_date,count(cl_id) |select partition_date,count(cl_id)
|from online.tl_hdfs_maidian_view |from online.tl_hdfs_maidian_view
|where action="page_view" |where action="page_view"
|and params["page_name"]="diary_detail" |and params["page_name"]="diary_detail"
|and params["referrer"]='hospital_all_cases' |and params["referrer"]='${a(i)}'
|and partition_date >='20181120' |and partition_date >='20181120'
|GROUP BY partition_date |GROUP BY partition_date
|order by partition_date |order by partition_date
""".stripMargin """.stripMargin
) )
diary_pv.show() diary_pv.show()
}
// GmeiConfig.writeToJDBCTable(view_count, "avg", SaveMode.Overwrite) // GmeiConfig.writeToJDBCTable(view_count, "avg", SaveMode.Overwrite)
......
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