Commit 651f26a2 authored by 高雅喆's avatar 高雅喆

change pre data from 1days to 7days

parent 49abaf24
......@@ -273,7 +273,7 @@ object EsmmPredData {
import sc.implicits._
val yesteday_have_seq = GmeiConfig.getMinusNDate(1)
val yesteday_have_seq = GmeiConfig.getMinusNDate(7)
//nearby_data
val raw_data = sc.sql(
......@@ -284,7 +284,7 @@ object EsmmPredData {
|select device_id,city_id,native_queue as merge_queue from ffm_diary_queue
|union
|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
)
raw_data.show()
......@@ -314,7 +314,7 @@ object EsmmPredData {
s"""
|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
|where a.stat_date='${yesteday_have_seq}' and b.native_queue != ""
|where a.stat_date>'${yesteday_have_seq}' and b.native_queue != ""
""".stripMargin
)
native_data.createOrReplaceTempView("native_data")
......@@ -345,7 +345,7 @@ object EsmmPredData {
//join feat
val yesteday = yesteday_have_seq.replace("-","")
val yesteday = GmeiConfig.getMinusNDate(1).replace("-","")
val sid_data = sc.sql(
s"""
|select distinct
......
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