nq8tc3y6
07/18/2023, 9:47 AMdef get_partitions():
ps = blah blah
return [Partition(name=p.n, value=p.v) for p in ps]
partition_def = DynamicPartitionsDefinition(get_partitions) # OK
def get_partitions():
ps = blah blah
return [Partition(name=p.n, value=p.v) for p in ps]
partition_def = DynamicPartitionsDefinition(name="name")
context.instance.add_dynamic_partitions(partition_def.name, get_partitions()) # NOT OK
claire
07/18/2023, 4:37 PMPartition
object and instead just use string partition keys. For that reason the new dynamic partitions only accept string valuesnq8tc3y6
07/19/2023, 7:46 AMclaire
07/21/2023, 4:35 PMPartition
object anywhere in the system, only using the partition key. So development was sometimes cumbersome having to build/fetch this Partition
object throughout the system.
Have you seen our docs on partitioned config? https://docs.dagster.io/concepts/partitions-schedules-sensors/partitions#date-partitioned-job
If you want to pass in additional fields to run config other than just the partition key, I would recommend using partitioned config.