https://dagster.io/ logo
Title
n

Nick Dellosa

12/15/2021, 9:55 PM
Is there a preferred pattern for defining sub-partitions? I have a job for which I'd like to define a set of static partitions, some of which might have time-based sub-partitions as well. My current thinking is to dynamically create a separate job for each of the static partitions, some of which will have partitioned config and some which will have regular config. Before I did this though I wanted to see if there was an accepted best practice yet.
y

yuhan

12/15/2021, 10:51 PM
Hi Nick, when you say “sub-partitions”, what exactly did you mean? As in, secondary time-based partition keys upon the static partitions?
s

sandy

12/16/2021, 1:33 AM
Hey @Nick Dellosa - I think your approach of dynamically generating jobs is reasonable. A "fancier" way that you could consider implementing this would be to implement your own subclass of
PartitionsDefinition
, with composite partition keys - e.g. "my_static_partition|2021-02-23"
👍 1