Commit 2a2b9f4e authored by 王志伟's avatar 王志伟

change sql

parent 1fe7b65c
...@@ -53,13 +53,13 @@ object testt { ...@@ -53,13 +53,13 @@ object testt {
println(strategy) println(strategy)
val get_data_dura = sc.sql( val get_data_dura = sc.sql(
s""" s"""
|select partition_date, sum(params['duration']) as total_dur,count(distinct(cl_id)) as num |select count(cid_id) as get_clk_count_newUser
|from online.tl_hdfs_maidian_view |from data_feed_click jd inner join device_id_newUser
|where action="on_app_session_over" |on jd.device_id = device_id_newUser.decive_id
|and cl_id regexp '${strategy}' |where (jd.cid_type = 'diary' or jd.cid_type = 'diary_video')
|and params['duration']>=0 and params['duration']<86400 |and jd.device_id regexp'${strategy}'
|and partition_date >='20180801' |and jd.device_id not in (select device_id from bl_device_list)
|group by partition_date order by partition_date desc |and jd.device_id not in (select device_id from blacklist)
""".stripMargin """.stripMargin
) )
get_data_dura.show() get_data_dura.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