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

smart_rank 相关的统计指标

parent 5becc769
...@@ -615,17 +615,32 @@ object smart_rank_count { ...@@ -615,17 +615,32 @@ object smart_rank_count {
final_id.createOrReplaceTempView("final_id") final_id.createOrReplaceTempView("final_id")
val meigou_pv = sc.sql( val user_city_meigou = sc.sql(
s""" s"""
|select device,params |select cl_id,city_id,params['business_id'] as meigou_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']="welfare_detail" |and params['page_name']="welfare_detail"
|and partition_date ='20181201' |and partition_date >='20181201'
|LIMIT 3 |and city_id is not null
""".stripMargin """.stripMargin
) )
meigou_pv.show(80) user_city_meigou.show(80)
val meigou_city = sc.sql(
s"""
|select b.id as meigou_id,d.city_id as meigou_city
|from online.tl_meigou_service_view b
|left join online.tl_hdfs_doctor_view c on b.doctor_id=c.id
|left join online.tl_hdfs_hospital_view d on c.hospital_id=d.id
|where b.partition_date='20181227'
|and c.partition_date='20181227'
|and d.partition_date='20181227'
""".stripMargin
)
meigou_city.show()
// val zixun_pv = sc.sql( // val zixun_pv = sc.sql(
// s""" // s"""
......
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