Commit a0f21c09 authored by 高雅喆's avatar 高雅喆

esmm data from 7days to 1day

parent 0323ece6
...@@ -272,7 +272,7 @@ object EsmmPredData { ...@@ -272,7 +272,7 @@ object EsmmPredData {
import sc.implicits._ import sc.implicits._
val yesteday_have_seq = GmeiConfig.getMinusNDate(7) val yesteday_have_seq = GmeiConfig.getMinusNDate(1)
//nearby_data //nearby_data
val raw_data = sc.sql( val raw_data = sc.sql(
...@@ -283,7 +283,7 @@ object EsmmPredData { ...@@ -283,7 +283,7 @@ object EsmmPredData {
|select device_id,city_id,native_queue as merge_queue from ffm_diary_queue |select device_id,city_id,native_queue as merge_queue from ffm_diary_queue
|union |union
|select device_id,city_id,search_queue as merge_queue from search_queue) as tmp1 |select device_id,city_id,search_queue as merge_queue from search_queue) as tmp1
|where tmp1.device_id in (select distinct device_id from data_feed_click where stat_date>'${yesteday_have_seq}') |where tmp1.device_id in (select distinct device_id from data_feed_click where stat_date='${yesteday_have_seq}')
""".stripMargin """.stripMargin
) )
raw_data.show() raw_data.show()
...@@ -313,7 +313,7 @@ object EsmmPredData { ...@@ -313,7 +313,7 @@ object EsmmPredData {
s""" s"""
|select distinct a.device_id,a.city_id,b.native_queue from data_feed_click a |select distinct a.device_id,a.city_id,b.native_queue from data_feed_click a
|left join biz_feed_diary_queue b on a.city_id = b.city_id |left join biz_feed_diary_queue b on a.city_id = b.city_id
|where a.stat_date>'${yesteday_have_seq}' and b.native_queue != "" |where a.stat_date='${yesteday_have_seq}' and b.native_queue != ""
""".stripMargin """.stripMargin
) )
native_data.createOrReplaceTempView("native_data") native_data.createOrReplaceTempView("native_data")
......
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