Hi everyone, I'm trying to understand how DynamicP...
# ask-community
Hi everyone, I'm trying to understand how DynamicPartitionsDefinition work and I'm having a hard time in figuring out how we can attach this to a running project. I understand that sensors can add partitions dynamically, but what if we had partitions before and want to represent and visualize them in Dagit? I'm looking for a way to set the initial state of the DynamicPartitionsDefinition basically 🤔
maybe this could be added to the documentation? Or is this a hack and not a standard behavior?
Are you talking about switching from a different partitions definition to dynamic partitions definition on a running project? I’m actually not sure what happens to the history here, opening a discussion.
The method sandy describes int he above thread is canonical and is already in the docs (admittedly our docs search is really bad and its something we’re working on improving)
thanks! I can't find that exact function in this document though... the one from dagster instance
Ah i see - I think we’ve changed our recommendation here to use the
for sensors… cc @claire on the historical context there (I think we’re thinking about changing the access on instance method
Hi Fabio! Yep, we're currently considering an improved API for adding/deleting partitions from within assets and ops, which is why the
methods have been removed from our docs. For now, if you want to have this functionality from within assets, you can continue to use the instance method. Within sensors, I'd recommend the
All right! This was mostly an exploratory effort so the singleton helped me get it up and running quickly. But the final solution will indeed use a sensor from our API