From d174f26342756c4bf1bae4ef1fc99925f2a2d0dd Mon Sep 17 00:00:00 2001 From: Mohammad Amin Date: Wed, 7 Aug 2024 10:06:59 +0330 Subject: [PATCH] fix: converting period to datetime! the period being passed via api to the DAG is not in datetime format, so we're converting it now. --- dags/discord_guild_analyzer_etl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dags/discord_guild_analyzer_etl.py b/dags/discord_guild_analyzer_etl.py index 403996be..147658b5 100644 --- a/dags/discord_guild_analyzer_etl.py +++ b/dags/discord_guild_analyzer_etl.py @@ -17,6 +17,7 @@ DiscordTransformRawMembers, ) from analyzer_helper.discord.fetch_discord_platforms import FetchDiscordPlatforms +from dateutil.parser import parse with DAG( dag_id="discord_guild_analyzer_etl", @@ -63,7 +64,7 @@ def fetch_discord_platforms(**kwargs) -> dict[str, str | datetime | bool]: platform = { "recompute": recompute, "platform_id": platform_id, - "period": period, + "period": parse(period), "guild_id": guild_id, }