https://dagster.io/ logo
Title
e

Elizabeth

02/03/2022, 7:29 PM
Is there a way to
get_runs
based on
run_key
in a sensor? It doesn’t appear to be an option for
PipelineRunsFilter
.
o

owen

02/03/2022, 7:37 PM
hi @Elizabeth, the
run_key
gets added to a tag on the job run (specifically,
{"dagster/run_key": <your_run_key>}
), so you can query for it through the tags argument on PipelineRunsFilter
e

Elizabeth

02/03/2022, 7:44 PM
@owen thanks for the prompt reply. Yes, this works nicely!
runs = context.instance.get_runs(
        filters=PipelineRunsFilter(
            tags={"dagster/run_key": 'foo'}
        )
    )
😛artydagster: 1
y

yuhan

06/16/2022, 12:27 AM
@Dagster Bot discussion How do I get runs by run_key in a sensor
d

Dagster Bot

06/16/2022, 12:27 AM
Question in the thread has been surfaced to GitHub Discussions for future discoverability: https://github.com/dagster-io/dagster/discussions/8425