Spencer Nelson
02/14/2023, 6:32 PMStaticPartitionsDefinition
. This is easy and I know how to do it, but I don’t get any of the cleverness of TimeWindowPartitionMapping, because TimeWindowPartitionMapping’s code implicitly does a bunch of checks like isinstance(downstream_partitions_def, TimeWindowPartitionsDefinition)
. I like TimeWindowPartitionMapping because it gives a really clear way to break up work. Stuff that’s hard to compute can be done daily, stuff that’s easy to compute can be done monthly, and stuff can remain in time-sorted order, which matters for me. And just grepping the code, it is easy to find dozens of similar isinstance
checks in _core/execution, _core/definitions/asset_graph.py, and elsewhere - I’m sure I’d be losing out on lots.
Or I could make a new subclass of DailyPartitionDefinition
. But I’m not sure what methods I need to override to get the behavior I want, and it’s not at all clear that the methods I would override are in the public API, so I’m worried my code would break from dagster refactoring.owen
02/14/2023, 7:21 PMAdam Bloom
02/15/2023, 12:49 PM