From 2654fcfe678997d0d577a74a70c7c01ecd25c3d7 Mon Sep 17 00:00:00 2001 From: Jian Shen Date: Sat, 18 Mar 2023 13:13:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=86=99=E5=85=A5=E4=B8=AD?= =?UTF-8?q?=E9=97=B4=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dags/business/business/community/comm.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dags/business/business/community/comm.py b/dags/business/business/community/comm.py index a9c763f..0ed2098 100644 --- a/dags/business/business/community/comm.py +++ b/dags/business/business/community/comm.py @@ -113,6 +113,11 @@ def sync(city=None): seaweed_existed_df = pd.DataFrame() seaweed_not_existed_df = seaweed_df + # 写入csv文件,防止小区变动导致的后续过程更新报错, + seaweed_df.to_csv(path + '/seaweed.csv', sep='@', encoding='UTF-8', index=False) + # 写入中间表clickhouse,解决多worker节点问题 + tmp_ck.to_sql_plus(seaweed_df, 'community_summary') + actions = list() # 对于存在的更新 count = 0 @@ -162,11 +167,6 @@ def sync(city=None): log.info("插入:" + str(count)) actions.clear() - # 写入csv文件,防止小区变动导致的后续过程更新报错, - #seaweed_df.to_csv(path + '/seaweed.csv', sep='@', encoding='UTF-8', index=False) - # 写入中间表clickhouse,解决多worker节点问题 - tmp_ck.to_sql_plus(seaweed_df, 'community_summary') - deal_comm(community_summary_df, seaweed_df) log.info(f"完成同步小区基本属性至206 {index_name}")