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

统计多天重复日记数量

parent 9754ea2a
......@@ -304,7 +304,7 @@ object Repeated_content_recommendation_moreday {
// val stat_date = GmeiConfig.getMinusNDate(1)
val stat_date = "2019-01-14"
val stat_date = "2019-01-15"
// val partition_date = stat_date.replace("-","")
......@@ -318,8 +318,8 @@ object Repeated_content_recommendation_moreday {
|select stat_date,device_id,concat_ws(',',collect_set(distinct cid_id)) as expoure_diary
|from data_feed_exposure_precise
|where cid_type = 'diary'
|and stat_date >='2018-12-29'
|and stat_date <'2019-01-14'
|and stat_date >='2018-12-30'
|and stat_date <'2019-01-15'
|group by device_id,stat_date
""".stripMargin
).rdd.map(row=>(row(0).toString,row(1).toString,row(2).toString)).map(row=>(row._2,row._3)).groupByKey()
......
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