diff --git a/apps/vinyl/src/assets.py b/apps/vinyl/src/assets.py index 0b74a06..31f3842 100644 --- a/apps/vinyl/src/assets.py +++ b/apps/vinyl/src/assets.py @@ -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!")