18-06-2026 1st commit

This commit is contained in:
Ankit Malik
2026-06-18 18:16:50 +05:30
parent 9cd4135d7b
commit d60740ae48
11 changed files with 3104 additions and 311 deletions
+6 -11
View File
@@ -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}')
=
""",
)