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

Aliénor Lougerstay

02/27/2023, 8:01 PM
Hi, how would I go about reading the tags of a job that ran previously, if for example I want to find out the run key of the previous run of said job, outside of a sensor execution context?
🤖 1
What I figured so far is that I can search for run records via
Copy code
last_successful_run = context.instance.get_run_records(
        filters=RunsFilter(
            job_name="log_s3_dummy_job",
            statuses=[DagsterRunStatus.SUCCESS],
        ),
        order_by="create_timestamp",)
But then I need to find out the run key or other tags for the runs in question
Solved - I found the context.instance.get_runs that had all the info I needde
s

sandy

02/27/2023, 10:20 PM
glad you were able to figure this out!
3 Views