Commit 39f42f20 authored by 张彦钊's avatar 张彦钊

Merge branch 'master' of git.wanmeizhensuo.com:ML/ffm-baseline

增加排序
parents c6d971ca 1fe7b65c
......@@ -18,7 +18,7 @@ object testt {
val defaultParams = Params()
val parser = new OptionParser[Params]("Feed_EDA") {
head("WeafareStat")
head("testt")
opt[String]("env")
.text(s"the databases environment you used")
.action((x, c) => c.copy(env = x))
......@@ -48,14 +48,14 @@ object testt {
ti.tidbMapTable(dbName = "jerry_test", tableName = "bl_device_list")
ti.tidbMapTable(dbName = "jerry_prod", tableName = "data_feed_exposure")
val strategies = Seq("3$","4$","5$","6$","7$","8$","a$","b$","c$","d$","e$","A$","B$","C$","D$")
val strategies = Seq("3$","4$","5$","6$","7$","8$","c$","d$","e$","A$","B$","C$","D$")
for (strategy <- strategies){
println(strategy)
val get_data_dura = sc.sql(
s"""
|select partition_date, sum(params['duration']) as total_dur,count(distinct(cl_id)) as num
|from online.tl_hdfs_maidian_view
|where where action="on_app_session_over"
|where action="on_app_session_over"
|and cl_id regexp '${strategy}'
|and params['duration']>=0 and params['duration']<86400
|and partition_date >='20180801'
......
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