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

smart_rank 相关的统计指标

parent 58b22d13
...@@ -615,7 +615,7 @@ object smart_rank_count { ...@@ -615,7 +615,7 @@ object smart_rank_count {
final_id.createOrReplaceTempView("final_id") final_id.createOrReplaceTempView("final_id")
val user_city_meigou = sc.sql( val user_city_meigou_view = sc.sql(
s""" s"""
|select cl_id as device_id,city_id as device_city,params['business_id'] as meigou_id |select cl_id as device_id,city_id as device_city,params['business_id'] as meigou_id
|from online.tl_hdfs_maidian_view |from online.tl_hdfs_maidian_view
...@@ -625,7 +625,8 @@ object smart_rank_count { ...@@ -625,7 +625,8 @@ object smart_rank_count {
|and city_id is not null |and city_id is not null
""".stripMargin """.stripMargin
) )
user_city_meigou.show(80) user_city_meigou_view.show(80)
user_city_meigou_view.createOrReplaceTempView("user_city_meigou_view")
val meigou_city = sc.sql( val meigou_city = sc.sql(
s""" s"""
...@@ -639,6 +640,20 @@ object smart_rank_count { ...@@ -639,6 +640,20 @@ object smart_rank_count {
""".stripMargin """.stripMargin
) )
meigou_city.show() meigou_city.show()
meigou_city.createOrReplaceTempView("meigou_city")
val meigou_pv_tongcheng = sc.sql(
s"""
|select a.device_id,a.device_city,a.meigou_id,b.meigou_city
|from user_city_meigou_view a
|left join meigou_city b
|on a.meigou_id=b.meigou_id
""".stripMargin
)
meigou_pv_tongcheng.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