cast release column
This commit is contained in:
@@ -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!")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user