TimeWindowPartitionMapping(start_offset=0,end_offset=1)
does not respect allow_nonexistent_upstream_partitions
#26935
Labels
What's the issue?
I have a case where one partition in downstream asset depends on two partitions in the upstream asset - one partition being the same partition and the other being the next partition. E.g
2025-01-01-05:00
in downstream needs2025-01-01-05:00
and2025-01-01-06:00
from the upstream.For this, I use
as the API docs quite clearly state that this is how it works:
Issue is that it seems as if the default (or explicit)
allow_nonexistent_upstream_partitions=False
is ignored, as this is what happens if we use the example from above with the two partitions:What did you expect to happen?
What is actually wanted and expected (continuation from above):
How to reproduce?
Datetimes need adjusting, but a simple upstream-downstream chain, for faster results, partitioned in 5-minute chunks.
Downstream partition depends on two partitions of upstream - the same partition and the next one (start_offset=0, end_offset=1).
Turn on the automation sensor, and observe how downstream partitions are always materialized twice. The first time is prematurely, when the "same" partition is materialized but the "next" partition in the upstream does not exist yet, and the second time is when the "next" partition in the upstream appears and materializes, which behaves like the partition_mapping defines and is expected. The first materialization is not expected and should not happen.
Dagster version
1.9.6
Deployment type
Dagster Helm chart
Deployment details
No response
Additional information
No response
Message from the maintainers
Impacted by this issue? Give it a 👍! We factor engagement into prioritization.
The text was updated successfully, but these errors were encountered: