Skip to content

Instantly share code, notes, and snippets.

@garethbrickman
Last active July 25, 2024 21:07
Show Gist options
  • Save garethbrickman/2082625ac31df34233a957d1675f298a to your computer and use it in GitHub Desktop.
Save garethbrickman/2082625ac31df34233a957d1675f298a to your computer and use it in GitHub Desktop.
Dagster - example query for finding a sensor's most recent failed run
{
"filter": {
"statuses": ["FAILURE"],
"tags": [
{
"key": "dagster/sensor_name",
"value": "name_of_sensor"
}
]
}
}
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