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

esmm pre data on activate uer

parent 39a163ee
...@@ -241,6 +241,15 @@ object EsmmPredData { ...@@ -241,6 +241,15 @@ object EsmmPredData {
ti.tidbMapTable(dbName = "jerry_prod",tableName = "data_feed_exposure") ti.tidbMapTable(dbName = "jerry_prod",tableName = "data_feed_exposure")
val yesteday_have_seq = GmeiConfig.getMinusNDate(1)
val activate_data = sc.sql(
s"""
|select a.device_id,a.city_id as ucity_id,explode(split(a.search_queue, ',')) as cid_id
|from merge_queue_table a
|left join data_feed_exposure b on a.device_id=b.device_id and a.city_id=b.city_id
|where b.stat_date='${yesteday_have_seq}'
""".stripMargin
)
val raw_data = sc.sql( val raw_data = sc.sql(
s""" s"""
...@@ -248,7 +257,7 @@ object EsmmPredData { ...@@ -248,7 +257,7 @@ object EsmmPredData {
|from merge_queue_table |from merge_queue_table
""".stripMargin """.stripMargin
) )
raw_data.createOrReplaceTempView("raw_data") activate_data.createOrReplaceTempView("raw_data")
// raw_data.show() // raw_data.show()
import sc.implicits._ import sc.implicits._
......
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