@@ -122,14 +122,15 @@ class OdsDmpUserInfoAll extends CommonSparkJob with Serializable {
| coalesce(b.gender,a.gender,10) as gender,
| coalesce(b.behavior,a.behavior) as behavior,
| coalesce(b.update_date,a.update_date) as update_date,
| coalesce(b.merge_bus,a.merge_bus) as merge_bus,
| coalesce(b.publish_date,a.publish_date) as publish_date
|from
| (select dev_id,dev_id_md5,dev_type,platform,install,interest,model,case when upper(country) = 'GB' then 'UK' else upper(country) end as country ,osversion,age,gender,behavior,update_date,
| (select dev_id,dev_id_md5,dev_type,platform,install,interest,model,case when upper(country) = 'GB' then 'UK' else upper(country) end as country ,osversion,age,gender,behavior,update_date,merge_bus,
| '$yesBef1Part' as publish_date
| from dwh.ods_dmp_user_info_daily where dt='$yesBef1Str'
| ) b
| full outer join
| (select dev_id,dev_id_md5,dev_type,platform,install,interest,model,case when upper(country) = 'GB' then 'UK' else upper(country) end as country ,osversion,age,gender,behavior,update_date,publish_date
| (select dev_id,dev_id_md5,dev_type,platform,install,interest,model,case when upper(country) = 'GB' then 'UK' else upper(country) end as country ,osversion,age,gender,behavior,update_date,merge_bus,publish_date
| from dwh.ods_dmp_user_info_all where dt = '$yesBef2DayStr' and update_date >= '$befYearPart') a
@@ -76,15 +76,16 @@ class OdsDmpUserInfoAllV2 extends CommonSparkJob with Serializable {
| coalesce(b.gender,a.gender,10) as gender,
| coalesce(b.behavior,a.behavior) as behavior,
| coalesce(b.update_date,a.update_date) as update_date,
| coalesce(b.merge_bus,a.merge_bus) as merge_bus,
| case when b.publish_date is not null and b.publish_date != '' then b.publish_date
| when a.publish_date is not null and a.publish_date != '' then a.publish_date
| else '${yesBef14Part}' end as publish_date
|from
| (select dev_id,dev_id_md5,dev_type,platform,install,interest,model,case when upper(country) = 'GB' then 'UK' else upper(country) end as country ,osversion, age, gender,behavior,update_date,publish_date
| (select dev_id,dev_id_md5,dev_type,platform,install,interest,model,case when upper(country) = 'GB' then 'UK' else upper(country) end as country ,osversion, age, gender,behavior,update_date,merge_bus,publish_date
| from dwh.ods_dmp_user_info_all_v2 where dt = '${yesBef2DayStr}' and update_date > '${yesBef14Part}') a
| full outer join
| (
| select dev_id,dev_id_md5,dev_type,platform,install,interest,model,case when upper(country) = 'GB' then 'UK' else upper(country) end as country ,osversion, age, gender,behavior,update_date,
| select dev_id,dev_id_md5,dev_type,platform,install,interest,model,case when upper(country) = 'GB' then 'UK' else upper(country) end as country ,osversion, age, gender,behavior,update_date,merge_bus,
| '${yesBef1Part}' as publish_date
| from dwh.ods_dmp_user_info_daily where dt='${yesBef1Str}'