18-06-2026 1st commit
This commit is contained in:
@@ -38,10 +38,7 @@ def delete_rows(
|
||||
WHERE {where_clause}
|
||||
"""
|
||||
|
||||
log.info(
|
||||
"Deleting from %s",
|
||||
table_name,
|
||||
)
|
||||
log.info(f"_ _ _ _ Deleting Data from ClickHouse for {table_name} _ _ _ _")
|
||||
|
||||
client.command(query)
|
||||
|
||||
@@ -72,16 +69,14 @@ def delete_existing_data(
|
||||
"Stock_Details",
|
||||
}
|
||||
|
||||
if table_name in mid_tables and mids:
|
||||
if table_name in mid_tables and mids :
|
||||
|
||||
mids_str = ",".join(
|
||||
map(str, mids)
|
||||
)
|
||||
mids_str = ",".join(str(mid) for mid in mids)
|
||||
|
||||
delete_rows(
|
||||
client,
|
||||
table_name,
|
||||
f"MID IN ({mids_str})",
|
||||
f"Mid IN ({mids_str})",
|
||||
)
|
||||
|
||||
return
|
||||
@@ -147,8 +142,8 @@ def delete_existing_data(
|
||||
client,
|
||||
table_name,
|
||||
f"""
|
||||
toDate(attendance_date)
|
||||
= toDate('{run_date}')
|
||||
toDate(visit_date) BETWEEN toDate('{run_date - }') AND toDate('{run_date}')
|
||||
=
|
||||
""",
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user