视图过滤

This commit is contained in:
wuaho 2021-08-17 15:35:16 +08:00
parent 346290412a
commit 8e003a4137

View File

@ -29,11 +29,14 @@ if os.path.exists(svrid_file):
sql = f"""drop table if exists {db}.event_view"""
res1 = client.execute(sql)
# 筛选有效数据
sql = f"""create view {db}.event_view as
select *
from {db}.event
where lower(`#os`) != 'windows'
and svrindex in {serverid}"""
and svrindex in {serverid}
and not startsWith(`orderid`,'debugPay')
"""
res2 = client.execute(sql)
with open(svrid_file, 'w') as f:
json.dump(sorted(serverid), f)