19-06-2026 1st commit

This commit is contained in:
Ankit Malik
2026-06-19 16:51:03 +05:30
parent d60740ae48
commit 97b22ea0f8
23 changed files with 2026 additions and 109 deletions
+6 -4
View File
@@ -1,6 +1,7 @@
from __future__ import annotations
import polars as pl
from datetime import date, datetime, timedelta
from log import log
@@ -91,9 +92,10 @@ def delete_existing_data(
client,
table_name,
f"""
toMonth(visit_date) = {run_date.month}
AND toYear(visit_date) = {run_date.year}
""",
project_id = 40148
AND toMonth(visit_date) = toMonth(toDate('2026-06-18'))
AND toYear(visit_date) = toYear(toDate('2026-06-18'))
""",
)
return
@@ -142,7 +144,7 @@ def delete_existing_data(
client,
table_name,
f"""
toDate(visit_date) BETWEEN toDate('{run_date - }') AND toDate('{run_date}')
toDate(visit_date) BETWEEN toDate('{run_date - timedelta(days=15) }') AND toDate('{run_date}')
=
""",
)