add workflow 客户地址信息提取,dev
This commit is contained in:
parent
b653feae21
commit
a2b20219b3
|
|
@ -319,14 +319,14 @@ def main():
|
||||||
if flag:
|
if flag:
|
||||||
# 初始化
|
# 初始化
|
||||||
db_manager = DatabaseManager(db_config)
|
db_manager = DatabaseManager(db_config)
|
||||||
custom_query = """
|
# custom_query = """
|
||||||
select
|
# select
|
||||||
dw_account as id ,
|
# dw_account as id ,
|
||||||
prov_name || '-' || city_name as city,
|
# prov_name || '-' || city_name as city,
|
||||||
address_detail as address
|
# address_detail as address
|
||||||
from p99_temp.address_city
|
# from p99_temp.address_city
|
||||||
where dw_account not in (select account_id from p70_ai_intelligence.agent_address_complete)
|
# where dw_account not in (select account_id from p70_ai_intelligence.agent_address_complete)
|
||||||
"""
|
# """
|
||||||
|
|
||||||
# custom_query = """
|
# custom_query = """
|
||||||
# select
|
# select
|
||||||
|
|
@ -336,6 +336,24 @@ where dw_account not in (select account_id from p70_ai_intelligence.agent_addre
|
||||||
# from p99_temp.address_city_1
|
# from p99_temp.address_city_1
|
||||||
# """
|
# """
|
||||||
|
|
||||||
|
custom_query = """
|
||||||
|
select
|
||||||
|
dw_account as id,
|
||||||
|
std_city as city,
|
||||||
|
std_address as address
|
||||||
|
|
||||||
|
|
||||||
|
from p99_temp.account_information_completion p1
|
||||||
|
left join p20_pdm.t00_china_city_pnum_ai p2
|
||||||
|
on p1.std_prov like p2.prov_name||'%'
|
||||||
|
and p2.city_name like p1.std_city||'%'
|
||||||
|
where p2.area is null and (p1.account_name_ind ='' or p1.account_name_ind is null)
|
||||||
|
and p1.std_address<>''and p1.std_city not LIKE'香港%'
|
||||||
|
and source_name not in (select source_name from p99_temp.account_info_all_final_t where data_sour='Old_data' )
|
||||||
|
--and p1.std_city in ('北京市','上海市','武汉市','深圳市')
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# 从数据库获取URL列表
|
# 从数据库获取URL列表
|
||||||
list = db_manager.get_urls_from_database(custom_query)
|
list = db_manager.get_urls_from_database(custom_query)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue