package mobvista.dmp.output.reyun

/**
 * @package: mobvista.dmp.output.reyun
 * @author: wangjf
 * @date: 2021/9/14
 * @time: 2:14 下午
 * @email: jinfeng.wang@mobvista.com
 */
object Constant {
  val tracking_impression =
    """
      |SELECT created, app_id, creative_id, platform, os_version, device_brand, device_model, country_code, network_type, ip, imei,
      |  mac, dev_id, idfa, ext_packagename, ext_finalpackagename, ext_channel, ext_oaid, ext_advinstalltime, ext_eventtime,
      |  ext_campaignpackagename, ext_deviceid
      |  FROM dwh.ods_adn_trackingnew_impression
      |  WHERE CONCAT(yyyy,mm,dd) = '@date' AND UPPER(country_code) = 'CN'
      |""".stripMargin

  val tracking_install =
    """
      |SELECT created, app_id, advertiser_id, creative_id, platform, os_version, device_brand, device_model, country_code, network_type,
      |  ip, imei, mac, dev_id, idfa, ext_campaignpackagename, ext_finalpackagename, ext_advinstalltime, ext_oaid, ext_eventtime, ext_deviceid
      |  FROM dwh.ods_adn_trackingnew_install
      |  WHERE CONCAT(yyyy,mm,dd) = '@date'
      |""".stripMargin

  val tracking_click =
    """
      |SELECT created, app_id, creative_id, platform, os_version, device_brand, device_model, country_code, network_type, ip, imei,
      |  mac, dev_id, idfa, ext_packagename, ext_finalpackagename, ext_channel, ext_oaid, ext_advinstalltime, ext_eventtime,
      |  ext_campaignpackagename, ext_deviceid
      |  FROM dwh.ods_adn_trackingnew_click
      |  WHERE CONCAT(yyyy,mm,dd) = '@date'
      |""".stripMargin

  val user_info =
    """
      |SELECT dev_id, CASE WHEN dev_type = 'android_id' THEN 'androidid' ELSE LOWER(dev_type) END dev_type, LOWER(platform) platform, UPPER(country) country, install, interest, update_date
      |  FROM dwh.ods_dmp_user_info_daily
      |  WHERE dt = '@date' AND UPPER(country) = 'CN' AND dev_type NOT IN ('sysid', 'ruid')
      |""".stripMargin
}
