diff --git a/dags/db/etl.company_report b/dags/db/etl.company_report index 5bf8e33..d1b1a30 100644 --- a/dags/db/etl.company_report +++ b/dags/db/etl.company_report @@ -19,4 +19,7 @@ FROM etl.dwd_company c LEFT JOIN ( SELECT unified_code, argMax(mail_address, year) mail_address, argMax(year, year) new_year FROM etl.company_report GROUP BY unified_code ) cr ON c.unified_code=cr.unified_code -WHERE cr.mail_address!='' and cr.mail_address is not null; \ No newline at end of file +WHERE cr.mail_address!='' and cr.mail_address is not null; + +# 清洗企业通信地址 +ALTER TABLE etl.dwd_company update mail_address1=replaceRegexpAll(mail_address, '^(.{2,}(省|自治区))?(.{2,}市)?(.{2,}(区|县))?', '') WHERE 1=1 \ No newline at end of file