https://dagster.io/ logo
#ask-community
Title
# ask-community
f

Félix Tremblay

04/21/2023, 12:40 PM
Hello 👋 I have a question about dynamic partitions. From the sensor that triggers runs for new partitions, is there a way to query the previous partitions that were created/launched by this sensor? Or, to query the previous runs of the job, and access their partition information?
o

owen

04/21/2023, 8:50 PM
hi @Félix Tremblay! for the second part, you can always use context.instance.get_runs(...) to get a set of runs matching a given filter. From there, the
dagster/partition
tag on the run will tell you what partition it executed for. For the first part, there's currently no built-in function for doing this, although you could consider storing this information in the sensor's cursor
👍 1
2 Views