Commit 0808694a by fan.jiang

人群包去除不符合要求的类型

parent f6e0e5df
......@@ -98,7 +98,7 @@ class RtdmpTmpId1142110895 extends CommonSparkJob with Serializable {
try {
val sql1=
s"""
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('1142110895','id1142110895') and device_type not in ('androidid','android_id','ruid')
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('1142110895','id1142110895') and device_type not in ('androidid','android_id','ruid','upid')
""".stripMargin
spark.sql(sql1).rdd.flatMap(buildRes(_)).coalesce(coalesce.toInt)
......@@ -106,7 +106,7 @@ class RtdmpTmpId1142110895 extends CommonSparkJob with Serializable {
val sql2=
s"""
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('3876827262021090301','id3876827262021090301') and business='dsp_req'
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('3876827262021090301','id3876827262021090301') and business='dsp_req' and device_type not in ('androidid','android_id','ruid','upid')
""".stripMargin
spark.sql(sql2).rdd.flatMap(buildRes(_)).coalesce(coalesce.toInt)
......@@ -114,7 +114,7 @@ class RtdmpTmpId1142110895 extends CommonSparkJob with Serializable {
val sql3=
s"""
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('3332062892021090301','id3332062892021090301') and business='dsp_req'
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('3332062892021090301','id3332062892021090301') and business='dsp_req' and device_type not in ('androidid','android_id','ruid','upid')
""".stripMargin
spark.sql(sql3).rdd.flatMap(buildRes(_)).coalesce(coalesce.toInt)
......@@ -122,7 +122,7 @@ class RtdmpTmpId1142110895 extends CommonSparkJob with Serializable {
val sql4=
s"""
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('13403763232021090301','id13403763232021090301') and business='dsp_req'
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('13403763232021090301','id13403763232021090301') and business='dsp_req' and device_type not in ('androidid','android_id','ruid','upid')
""".stripMargin
spark.sql(sql4).rdd.flatMap(buildRes(_)).coalesce(coalesce.toInt)
......@@ -130,7 +130,7 @@ class RtdmpTmpId1142110895 extends CommonSparkJob with Serializable {
val sql5=
s"""
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('10442830592021090301','id10442830592021090301') and business='dsp_req'
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('10442830592021090301','id10442830592021090301') and business='dsp_req' and device_type not in ('androidid','android_id','ruid','upid')
""".stripMargin
spark.sql(sql5).rdd.flatMap(buildRes(_)).coalesce(coalesce.toInt)
......@@ -138,7 +138,7 @@ class RtdmpTmpId1142110895 extends CommonSparkJob with Serializable {
val sql6=
s"""
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('com.xunmeng.pinduoduo_bes') and business='dsp_req'
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('com.xunmeng.pinduoduo_bes') and business='dsp_req' and device_type not in ('androidid','android_id','ruid','upid')
""".stripMargin
spark.sql(sql6).rdd.flatMap(buildRes(_)).coalesce(coalesce.toInt)
......@@ -146,7 +146,7 @@ class RtdmpTmpId1142110895 extends CommonSparkJob with Serializable {
val sql7=
s"""
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('com.ss.android.ugc.aweme_iqiyi') and business='dsp_req'
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('com.ss.android.ugc.aweme_iqiyi') and business='dsp_req' and device_type not in ('androidid','android_id','ruid','upid')
""".stripMargin
spark.sql(sql7).rdd.flatMap(buildRes(_)).coalesce(coalesce.toInt)
......@@ -154,7 +154,7 @@ class RtdmpTmpId1142110895 extends CommonSparkJob with Serializable {
val sql8=
s"""
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('11421108952021090302','id11421108952021090302') and business='dsp_req'
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('11421108952021090302','id11421108952021090302') and business='dsp_req' and device_type not in ('androidid','android_id','ruid','upid')
""".stripMargin
spark.sql(sql8).rdd.flatMap(buildRes(_)).coalesce(coalesce.toInt)
......@@ -162,7 +162,7 @@ class RtdmpTmpId1142110895 extends CommonSparkJob with Serializable {
val sql9=
s"""
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('com.xunmeng.pinduoduo_oppoziyou') and business='dsp_req'
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('com.xunmeng.pinduoduo_oppoziyou') and business='dsp_req' and device_type not in ('androidid','android_id','ruid','upid')
""".stripMargin
spark.sql(sql9).rdd.flatMap(buildRes(_)).coalesce(coalesce.toInt)
......@@ -170,7 +170,7 @@ class RtdmpTmpId1142110895 extends CommonSparkJob with Serializable {
val sql10=
s"""
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('com.xunmeng.pinduoduo_oppoziyou_notinstall') and business='dsp_req'
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('com.xunmeng.pinduoduo_oppoziyou_notinstall') and business='dsp_req' and device_type not in ('androidid','android_id','ruid','upid')
""".stripMargin
spark.sql(sql10).rdd.flatMap(buildRes(_)).coalesce(coalesce.toInt)
......@@ -178,7 +178,7 @@ class RtdmpTmpId1142110895 extends CommonSparkJob with Serializable {
val sql11=
s"""
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('com.xunmeng.pinduoduo_oppoziyou_hist_notinstall') and business='dsp_req'
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('com.xunmeng.pinduoduo_oppoziyou_hist_notinstall') and business='dsp_req' and device_type not in ('androidid','android_id','ruid','upid')
""".stripMargin
spark.sql(sql11).rdd.flatMap(buildRes(_)).coalesce(coalesce.toInt)
......@@ -186,7 +186,7 @@ class RtdmpTmpId1142110895 extends CommonSparkJob with Serializable {
val sql12=
s"""
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('com.xunmeng.pinduoduo_oppolianmeng') and business='dsp_req'
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('com.xunmeng.pinduoduo_oppolianmeng') and business='dsp_req' and device_type not in ('androidid','android_id','ruid','upid')
""".stripMargin
spark.sql(sql12).rdd.flatMap(buildRes(_)).coalesce(coalesce.toInt)
......@@ -194,7 +194,7 @@ class RtdmpTmpId1142110895 extends CommonSparkJob with Serializable {
val sql13=
s"""
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('com.xunmeng.pinduoduo_oppolianmeng_hist1year_notinstall') and business='dsp_req'
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('com.xunmeng.pinduoduo_oppolianmeng_hist1year_notinstall') and business='dsp_req' and device_type not in ('androidid','android_id','ruid','upid')
""".stripMargin
spark.sql(sql13).rdd.flatMap(buildRes(_)).coalesce(coalesce.toInt)
......@@ -202,7 +202,7 @@ class RtdmpTmpId1142110895 extends CommonSparkJob with Serializable {
val sql14=
s"""
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('com.xunmeng.pinduoduo_oppolianmeng_histhalfyear_notinstall') and business='dsp_req'
|select device_id, device_type from dwh.dm_install_list_v2 where dt='${dt_today}' and package_name in ('com.xunmeng.pinduoduo_oppolianmeng_histhalfyear_notinstall') and business='dsp_req' and device_type not in ('androidid','android_id','ruid','upid')
""".stripMargin
spark.sql(sql14).rdd.flatMap(buildRes(_)).coalesce(coalesce.toInt)
......@@ -210,7 +210,7 @@ class RtdmpTmpId1142110895 extends CommonSparkJob with Serializable {
val sql15=
s"""
|select device_id, device_type from dwh.dm_install_list_v2 where ( (dt='${dt_today}' and business in ('btop')) or (dt='${dt_day}' and business in ('TO')) ) and package_name in ('com.xunmeng.pinduoduo')
|select device_id, device_type from dwh.dm_install_list_v2 where ( (dt='${dt_today}' and business in ('btop')) or (dt='${dt_day}' and business in ('TO')) ) and package_name in ('com.xunmeng.pinduoduo') and device_type not in ('androidid','android_id','ruid','upid')
""".stripMargin
spark.sql(sql15).rdd.flatMap(buildRes(_)).coalesce(coalesce.toInt)
......
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