I have a `DynamicPartitionsDefinition` for a datas...
# ask-community
n
I have a
DynamicPartitionsDefinition
for a dataset which is set by a sensor. A dataset can either be real or sim. How do I add this attribute to the partition? Should I use a
MultiPartitionsDefinition
with the dynamic dataset and a static real/sim? The problem with a
MultiPartitionsDefinition
is a dataset can only every be sim or real whereas
MultiPartitionsDefinition
doesn't really encapsulate this exclusivity
🤖 1
A hack is to append
sim_
or
real_
to the parition name. E.g., instead of
dataset0
the parition would be
sim_dataset0
s
Partitions are just string identifiers, so the only ways to accommodate these additional properties are to: (a) encode them in the string like you suggest; (b) store these properties outside the
PartitionsDefinition
in a dictionary or some other data structure where you perform lookups on the key with a function.