@@ -214,10 +214,11 @@ class DspImpressionHourCombine extends CommonSparkJob with Serializable {
| case when request.requestid is not null and impression.exchanges != 'nexage' then request.cadvertiserid else impression.cadvertiserid end as cadvertiserid,
| case when request.requestid is not null and impression.exchanges != 'nexage' then request.ccreativeid else impression.ccreativeid end as ccreativeid,
| case when request.requestid is not null and impression.exchanges != 'nexage' then 1 when request.requestid is null and impression.exchanges != 'nexage' then 0 end,
| impression.impext,
| coalesce(request.rg,impression.rg) rg
| from ( select time,xforwardip,ip,exchanges,elapsed,url,body,requestid,bid,price,`describe`,ext1,ext2,ext3,ext4,ext5,auctiontype,bidreqid,impid,publisherid,appid,appname,posid,category,intl,imagesize,deviceip,make,model,os,osv,devicetype,cncttype,countrycode,googleadid,imeisha1,androididmd5,idfa,keywords,yob,gender,ext6,ext7,ext8,ext9,ext10,campaignid,cinstallprice,cappname,cpackagename,cadvertiserid,ccreativeid,yr,mt,dt,rg
| from ( select time,xforwardip,ip,exchanges,elapsed,url,body,requestid,bid,price,`describe`,ext1,ext2,ext3,ext4,ext5,auctiontype,bidreqid,impid,publisherid,appid,appname,posid,category,intl,imagesize,deviceip,make,model,os,osv,devicetype,cncttype,countrycode,googleadid,imeisha1,androididmd5,idfa,keywords,yob,gender,ext6,ext7,ext8,ext9,ext10,campaignid,cinstallprice,cappname,cpackagename,cadvertiserid,ccreativeid,impext,yr,mt,dt,rg
| from adn_dsp.log_adn_dsp_impression_org_orc_hour where concat(yr,mt,dt,hh) = '${endtime}'
| group by time,xforwardip,ip,exchanges,elapsed,url,body,requestid,bid,price,`describe`,ext1,ext2,ext3,ext4,ext5,auctiontype,bidreqid,impid,publisherid,appid,appname,posid,category,intl,imagesize,deviceip,make,model,os,osv,devicetype,cncttype,countrycode,googleadid,imeisha1,androididmd5,idfa,keywords,yob,gender,ext6,ext7,ext8,ext9,ext10,campaignid,cinstallprice,cappname,cpackagename,cadvertiserid,ccreativeid,yr,mt,dt,rg
| group by time,xforwardip,ip,exchanges,elapsed,url,body,requestid,bid,price,`describe`,ext1,ext2,ext3,ext4,ext5,auctiontype,bidreqid,impid,publisherid,appid,appname,posid,category,intl,imagesize,deviceip,make,model,os,osv,devicetype,cncttype,countrycode,googleadid,imeisha1,androididmd5,idfa,keywords,yob,gender,ext6,ext7,ext8,ext9,ext10,campaignid,cinstallprice,cappname,cpackagename,cadvertiserid,ccreativeid,impext,yr,mt,dt,rg
| ) impression
| left join
| log_adn_dsp_bid_request_orc_hour request
...
...
@@ -241,7 +242,7 @@ class DspImpressionHourCombine extends CommonSparkJob with Serializable {
|from (select dev_id,case when input_file_name() like '%result_cuhuo%' then concat('com.taobao.foractivation.',substr(input_file_name(),60,6)) when input_file_name() like '%result_acc%' then concat('com.taobao.foractivation.',substr(input_file_name(),58,6)) end as channel_id
|from (select dev_id,case when input_file_name() like '%result_cuhuo%' then concat('com.taobao.foractivation.',substr(split( input_file_name(), '/')[9],14,6)) when input_file_name() like '%result_acc%' then concat('com.taobao.foractivation.',substr(split( input_file_name(), '/')[9],12,6)) end as channel_id
|from dwh.ali_taobao_postback_activation_daily
|where dt ='${dt_taobao_postback_day}' and (input_file_name() like '%result_cuhuo%' or input_file_name() like '%result_acc%') and split( input_file_name(), '/')[8] in ('1103','479','483','485','487','488','491','493','494','497','499','502','508','514','515','577','580','647','653','776','777','782','783') ) X
|group by X.dev_id ) t2
...
...
@@ -268,7 +271,7 @@ class EtlAliActivitionPostBackDaily extends CommonSparkJob with Serializable {
| where dt='${today}' and update_date >= '${dt_dash_rec15day}'
|from (select dev_id,case when input_file_name() like '%result_cuhuo%' then concat('202005',substr(input_file_name(),60,6)) when input_file_name() like '%result_acc%' then concat('202005',substr(input_file_name(),58,6)) end as channel_id
|from (select dev_id,case when input_file_name() like '%result_cuhuo%' then concat('202005',substr(split( input_file_name(), '/')[9],14,6)) when input_file_name() like '%result_acc%' then concat('202005',substr(split( input_file_name(), '/')[9],12,6)) end as channel_id
|from dwh.ali_taobao_postback_activation_daily
|where dt ='${dt_taobao_postback_day}' and (input_file_name() like '%result_cuhuo%' or input_file_name() like '%result_acc%') and split( input_file_name(), '/')[8] in ('1104','480','481','482','484','486','489','492','496','503','505','509','511','512','513','578','646','652','778','779','780','785') ) X
|group by X.dev_id ) t2
...
...
@@ -338,7 +341,7 @@ class EtlAliActivitionPostBackDaily extends CommonSparkJob with Serializable {
| where dt='${today}' and update_date >= '${dt_dash_rec15day}'
|from (select dev_id,case when input_file_name() like '%result_cuhuo%' then concat('com.taobao.foractivation.',substr(input_file_name(),60,6),'_oaid') when input_file_name() like '%result_acc%' then concat('com.taobao.foractivation.',substr(input_file_name(),58,6),'_oaid') end as channel_id
|from (select dev_id,case when input_file_name() like '%result_cuhuo%' then concat('com.taobao.foractivation.',substr(split( input_file_name(), '/')[9],14,6),'_oaid') when input_file_name() like '%result_acc%' then concat('com.taobao.foractivation.',substr(split( input_file_name(), '/')[9],12,6),'_oaid') end as channel_id
|from dwh.ali_taobao_postback_activation_daily
|where dt ='${dt_taobao_postback_day}' and (input_file_name() like '%result_cuhuo%' or input_file_name() like '%result_acc%') and split( input_file_name(), '/')[8] in ('1105','473','490','495','498','500','501','504','506','507','510','648','654','781','784') ) X