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

修改统计参数

parent e5720856
......@@ -192,7 +192,7 @@ object coincidence_xinyang {
println(pre_monthday)
//获取截止目前获得应用列表的用户的device_id
val all_device_id = sc.sql(
/* val all_device_id = sc.sql(
s"""
|select distinct(cl_id) as device_id
|from online.tl_hdfs_maidian_view
......@@ -201,10 +201,10 @@ object coincidence_xinyang {
|and cl_id not in (select device_id from bl_device_list)
|and cl_id not in (select device_id from blacklist)
""".stripMargin
).repartition(100)
)
all_device_id.createOrReplaceTempView("all_device_id")
*/
//获取每日活跃用户中与新氧重合用户占比
//1.每日活跃中与新氧重合用户数
val data = yesterday.replace("-","")
......@@ -214,7 +214,7 @@ object coincidence_xinyang {
|from device_id_coincidence
|where stat_date = '${data}'
""".stripMargin
).repartition(100)
)
//2.获得应用列表的每日活跃总用户数
val yesterday_expoure_num = sc.sql(
s"""
......@@ -225,7 +225,7 @@ object coincidence_xinyang {
|and cl_id not in (select device_id from bl_device_list)
|and cl_id not in (select device_id from blacklist)
""".stripMargin
).repartition(100)
)
//获取每周活跃用户中与新氧重合用户占比
......@@ -237,7 +237,7 @@ object coincidence_xinyang {
|from device_id_coincidence
|where stat_date >= '${week_day}'
""".stripMargin
).repartition(100)
)
//2.获得应用列表的每周活跃总用户
val week_expoure_num = sc.sql(
s"""
......@@ -248,7 +248,7 @@ object coincidence_xinyang {
|and cl_id not in (select device_id from bl_device_list)
|and cl_id not in (select device_id from blacklist)
""".stripMargin
).repartition(100)
)
//获取每月活跃用户中与新氧用户重合用户占比
//1.0 每月活跃中与新氧用户重合用户数
......@@ -259,7 +259,7 @@ object coincidence_xinyang {
|from device_id_coincidence
|where stat_date > '${month_day}'
""".stripMargin
).repartition(100)
)
//2.0 获得应用列表的每月活跃总用户
val month_expoure_num = sc.sql(
s"""
......@@ -270,7 +270,7 @@ object coincidence_xinyang {
|and cl_id not in (select device_id from bl_device_list)
|and cl_id not in (select device_id from blacklist)
""".stripMargin
).repartition(100)
)
val result = yesterday_coincidence.join(yesterday_expoure_num,"stat_date")
.join(week_coincidence,"stat_date")
......
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