Last active
July 25, 2024 21:07
-
-
Save garethbrickman/2082625ac31df34233a957d1675f298a to your computer and use it in GitHub Desktop.
Dagster - example query for finding a sensor's most recent failed run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"filter": { | |
"statuses": ["FAILURE"], | |
"tags": [ | |
{ | |
"key": "dagster/sensor_name", | |
"value": "name_of_sensor" | |
} | |
] | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query RunsBySensorAndStatus($filter: RunsFilter!) { | |
runsOrError(filter: $filter, limit: 1) { | |
__typename | |
... on Runs { | |
results { | |
runId | |
jobName | |
status | |
startTime | |
endTime | |
tags { | |
key | |
value | |
} | |
} | |
} | |
... on InvalidPipelineRunsFilterError { | |
message | |
} | |
... on PythonError { | |
message | |
stack | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment