From 83665e7e815225979b4b3f6c057a3d895dddba1e Mon Sep 17 00:00:00 2001 From: Jian Shen Date: Thu, 8 Jun 2023 15:03:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dags/db/etl.company_report | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dags/db/etl.company_report b/dags/db/etl.company_report index d1b1a30..12cd725 100644 --- a/dags/db/etl.company_report +++ b/dags/db/etl.company_report @@ -21,5 +21,10 @@ LEFT JOIN ( ) cr ON c.unified_code=cr.unified_code WHERE cr.mail_address!='' and cr.mail_address is not null; +# 合并 +optimize table etl.dwd_company final; + # 清洗企业通信地址 -ALTER TABLE etl.dwd_company update mail_address1=replaceRegexpAll(mail_address, '^(.{2,}(省|自治区))?(.{2,}市)?(.{2,}(区|县))?', '') WHERE 1=1 \ No newline at end of file +ALTER TABLE etl.dwd_company update mail_address1=replaceRegexpAll(mail_address, '^(.{2,}(省|自治区))?(.{2,}市)?(.{2,}(区|县))?', '') WHERE 1=1 + +INSERT INTO etl.dwm_company(unified_code, province, city, region, name, address) SELECT unified_code, province_name, city_name, region_name, ent_name, reg_addr1 FROM etl.dwd_company WHERE city_name !='' and region_name != '' and reg_addr1 != '';