Commit 489c5c51 authored by 王志伟's avatar 王志伟

新统计

parent add72c44
......@@ -68,22 +68,37 @@ object testt {
val a = Array("personal_store_diary_list","question_detail","received_votes","search_result","search_result_diary","search_result_more"
,"search_result_welfare","service_all_cases_service_comment","spell_special_list","topic_detail","welfare_detail","welfare_list","welfare_special","wiki_detail"
,"zone_detail","zone_v3")
for (i <- 0 until a.length){
val diary_pv = sc.sql(
s"""
|select partition_date,count(cl_id)
|from online.tl_hdfs_maidian_view
|where action="page_view"
|and params["page_name"]="diary_detail"
|and params["referrer"]='${a(i)}'
|and partition_date >='20181120'
|GROUP BY partition_date
|order by partition_date
// for (i <- 0 until a.length){
// val diary_pv = sc.sql(
// s"""
// |select partition_date,count(cl_id)
// |from online.tl_hdfs_maidian_view
// |where action="page_view"
// |and params["page_name"]="diary_detail"
// |and params["referrer"]='${a(i)}'
// |and partition_date >='20181120'
// |GROUP BY partition_date
// |order by partition_date
// """.stripMargin
// )
// println("该来源的数据为:"+ a(i))
// diary_pv.show()
// }
val diary_pv = sc.sql(
s"""
|select partition_date,count(cl_id)
|from online.tl_hdfs_maidian_view
|where action="page_view"
|and params["page_name"]="diary_detail"
|and partition_date >='20181120'
|GROUP BY partition_date
|order by partition_date
""".stripMargin
)
println("该来源的数据为:"+ a(i))
diary_pv.show()
}
)
diary_pv.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