I have come across what appears to be a bug with p...
# ask-community
r
I have come across what appears to be a bug with partitioned assets. I have created an example completely devoid of any custom code. If you take this example and materialize the job with the date of 2023-03-02 it works, no problem. If you materialize the asset with it's first possible date of 2023-03-01 then the first asset's return value that is passed to the second asset (which should be a simple string) will in fact be a None and the second asset will blow up. I am on dagster 1.1.13.
from dagster import asset, define_asset_job, build_schedule_from_partitioned_job, DailyPartitionsDefinition
@asset(config_schema={},
partitions_def=DailyPartitionsDefinition(start_date='2023-03-01'))
def first_asset(context) -> str:
part_date_str = context.asset_partition_key_for_output()
return part_date_str + " This text came from first asset"
@asset(config_schema={},
partitions_def=DailyPartitionsDefinition(start_date='2023-03-01'))
def second_asset(context, first_asset) -> None:
part_date_str = context.asset_partition_key_for_output()
<http://context.log.info|context.log.info>("first asset returned: " + first_asset)
return None
example_job = define_asset_job("example_job", selection=["*second_asset"],
partitions_def=DailyPartitionsDefinition(start_date='2023-03-01'), config={})
example_schedule = build_schedule_from_partitioned_job(example_job,
name="Daily_Partitioned_Job_For_example_job",
minute_of_hour=15, hour_of_day=7)
🤖 1
Upgraded to 1.2.4 and the problem is resolved
👍 1