Daniel Gafni
07/14/2023, 8:32 AM@multi_asset
which makes sure the processed files are always appended to B whenever A is materialized.
4. Now when I receive new files to process I would like to filter them by the already processed files in B. But this would create a circular/self dependency, because now I need B asset to update the B asset (by appending filtered files).
Of course, I could just manually read the asset without lettings Dagster know about it as a workaround. However, I would lose some benefits of using assets/IOManagers in this case.
A possible solution would be to introduce dynamic time partitions. In this case the asset could depend on a previous partition of itself, while the partitions would appear dynamically.owen
07/14/2023, 5:16 PMload_asset_value
to invoke the IOManager for you: https://github.com/dagster-io/dagster/discussions/14432
We have in the past considered some sort of "ContinuousTimeWindowPartitionsDefinition", where any run could target a time partition with an arbitrary start/end point. This could in theory go along with an "AllPreviousPartitionMapping", where a given partition of an asset corresponds to all prior partitions of another asset.
This could also maybe be used in a self-partition mapping, so that you could explicitly define that an asset depends on all previous partitions of itself.
Alternatively, we could cut out all that partition mapping stuff and just let a non-partitioned asset depend on itself, although it's possible that that could be trickier to implement than it soundsDaniel Gafni
07/14/2023, 10:26 PMDaniel Gafni
07/18/2023, 7:56 AMowen
07/18/2023, 9:20 PMDaniel Gafni
07/18/2023, 10:47 PMowen
07/19/2023, 9:26 PMDaniel Gafni
07/25/2023, 11:27 AMDefinitions.materialize_asset
instead as it would be more versatile