cast release column

This commit is contained in:
2025-09-23 19:17:14 +02:00
parent 127a773c82
commit 7a600f6264

View File

@@ -198,7 +198,6 @@ def new_deals(
if len(partition_keys := sorted(partitions.keys())) < 2:
context.log.warning("Not enough partitions to fetch new deals!")
return
before, after = partition_keys[-2:]
@@ -220,7 +219,9 @@ def new_deals(
new_df = df_after.join(df_before.select("id"), on="id", how="anti").collect()
if new_df.height:
context.log.info(f"New deals found ({new_df.height}x)!")
yield dg.Output(Deal.DataFrame(new_df))
yield dg.Output(
Deal.DataFrame(new_df.with_columns(pl.col("release").cast(pl.Date)))
)
else:
context.log.info("No new deals found!")