Commit ec66e7f9 by fan.jiang

reyun add new packagename

parent 8c49f6c6
......@@ -76,7 +76,30 @@ class ReyunDaily extends CommonSparkJob with Serializable{
| where t2.device_type is not null
""".stripMargin
spark.sql(sql1).coalesce(coalesce.toInt)
spark.sql(sql1).createOrReplaceTempView("reyun_daily_origin")
val sql2=
s"""
|select
|device_id,
|device_type,
|platform,
|package_name,
|country
|from reyun_daily_origin
|union
|select
|device_id,
|device_type,
|platform,
|concat(package_name,"_",device_type,"_reyun") package_name,
|country
|from reyun_daily_origin
|where package_name in ("com.taobao.taobao","com.sankuai.meituan","com.eg.android.AlipayGphone")
| and device_type in ("imei","oaid")
""".stripMargin
spark.sql(sql2).coalesce(coalesce.toInt)
.write
.mode(SaveMode.Overwrite)
.option("orc.compress", "zlib")
......
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