Skip to content

Instantly share code, notes, and snippets.

@garethbrickman
Last active April 5, 2024 20:09
Show Gist options
  • Save garethbrickman/c55afae54fbdb845b7f05d12636e1873 to your computer and use it in GitHub Desktop.
Save garethbrickman/c55afae54fbdb845b7f05d12636e1873 to your computer and use it in GitHub Desktop.
Dagster - example query for InstigationStateQuery
query InstigationStateQuery {
instigationStateOrError(instigationSelector: {
repositoryName: "__repository__",
repositoryLocationName: "data-eng-pipeline",
name: "orders_sensor"
}) {
__typename
... on InstigationState {
id
status
ticks(limit:1) {
timestamp
endTimestamp
}
runs(limit:1) {
id
status
}
}
... on PythonError {
message
stack
}
}
}
query InstigationStateQuery($instigationSelector: InstigationSelector!) {
instigationStateOrError(instigationSelector: $instigationSelector) {
__typename
... on InstigationState {
id
status
ticks(limit:1) {
timestamp
endTimestamp
}
runs(limit:1) {
id
status
}
}
... on PythonError {
message
stack
}
}
}
{
"instigationSelector": {
"repositoryName": "__repository__",
"repositoryLocationName": "data-eng-pipeline",
"name": "orders_sensor"
}
}
# repositoryName = name of Repository
# repositoryLocationName = name of the Code Location
# name = name of the sensor/schedule
# if the Code location name is something like `foo@bar` then the repository name is "foo" and location name is "bar": {repository}@{location}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment