Commit bd492f9a by WangJinfeng

fix tracking etl job

parent 6b3ba3b6
...@@ -120,6 +120,11 @@ class AdnOrgLogEtlHours extends CommonSparkJob with Serializable { ...@@ -120,6 +120,11 @@ class AdnOrgLogEtlHours extends CommonSparkJob with Serializable {
} else { } else {
"" ""
} }
val f_ruid = if (StringUtils.isNotBlank(ruid) && ruid.length > 16) {
ruid
} else {
""
}
var f_platform = if (StringUtils.isNotBlank(platform)) { var f_platform = if (StringUtils.isNotBlank(platform)) {
platform.toLowerCase() platform.toLowerCase()
...@@ -129,7 +134,7 @@ class AdnOrgLogEtlHours extends CommonSparkJob with Serializable { ...@@ -129,7 +134,7 @@ class AdnOrgLogEtlHours extends CommonSparkJob with Serializable {
f_platform = if (f_platform.contains("ios") || f_platform.contains("iphone") || deviceBrand.toLowerCase.contains("apple") f_platform = if (f_platform.contains("ios") || f_platform.contains("iphone") || deviceBrand.toLowerCase.contains("apple")
|| deviceModel.toLowerCase.contains("iphone") || deviceModel.toLowerCase.contains("ipad") || osVersion.toLowerCase.contains("ios") || deviceModel.toLowerCase.contains("iphone") || deviceModel.toLowerCase.contains("ipad") || osVersion.toLowerCase.contains("ios")
|| StringUtils.isNotBlank(f_idfa) || StringUtils.isNotBlank(f_idfv)) { || StringUtils.isNotBlank(f_idfa) || StringUtils.isNotBlank(f_idfv) || StringUtils.isNotBlank(f_ruid)) {
"ios" "ios"
} else if (f_platform.contains("android") || osVersion.toLowerCase.contains("android") || } else if (f_platform.contains("android") || osVersion.toLowerCase.contains("android") ||
StringUtils.isNotBlank(f_imei) || StringUtils.isNotBlank(f_androidId) || StringUtils.isNotBlank(f_oaid) || StringUtils.isNotBlank(f_gaid)) { StringUtils.isNotBlank(f_imei) || StringUtils.isNotBlank(f_androidId) || StringUtils.isNotBlank(f_oaid) || StringUtils.isNotBlank(f_gaid)) {
...@@ -138,10 +143,10 @@ class AdnOrgLogEtlHours extends CommonSparkJob with Serializable { ...@@ -138,10 +143,10 @@ class AdnOrgLogEtlHours extends CommonSparkJob with Serializable {
"other" "other"
} }
if ((StringUtils.isNotBlank(f_idfa) || StringUtils.isNotBlank(f_idfv) || StringUtils.isNotBlank(f_imei) || StringUtils.isNotBlank(f_androidId) || if ((StringUtils.isNotBlank(f_idfa) || StringUtils.isNotBlank(f_idfv) || StringUtils.isNotBlank(f_imei) || StringUtils.isNotBlank(f_androidId) ||
StringUtils.isNotBlank(f_oaid) || StringUtils.isNotBlank(f_gaid) || StringUtils.isNotBlank(f_sysId) || StringUtils.isNotBlank(ruid)) && StringUtils.isNotBlank(f_oaid) || StringUtils.isNotBlank(f_gaid) || StringUtils.isNotBlank(f_sysId) || StringUtils.isNotBlank(f_ruid)) &&
!"other".equals(f_platform)) { !"other".equals(f_platform)) {
MRUtils.JOINER.join(date, time, timestamp, appId, f_platform, osVersion, sdkVersion, deviceModel, screenSize, countryCode, MRUtils.JOINER.join(date, time, timestamp, appId, f_platform, osVersion, sdkVersion, deviceModel, screenSize, countryCode,
language, ip, f_imei, mac, f_androidId, f_gaid, f_idfa, deviceBrand, f_sysId, packageName, strategy, f_oaid, f_idfv, ruid) language, ip, f_imei, mac, f_androidId, f_gaid, f_idfa, deviceBrand, f_sysId, packageName, strategy, f_oaid, f_idfv, f_ruid)
} else { } else {
null null
} }
......
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