From 6fee8096dd1076d0e4198ac528e31366bab52851 Mon Sep 17 00:00:00 2001 From: "shenjian@fangjia.com" Date: Thu, 1 Jun 2023 16:44:58 +0800 Subject: [PATCH] db --- dags/db/etl.company_report | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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