Skip to content

Instantly share code, notes, and snippets.

@garethbrickman
Last active May 13, 2024 14:54
Show Gist options
  • Save garethbrickman/5b07b222b3aef7443d1b31459b4d40d4 to your computer and use it in GitHub Desktop.
Save garethbrickman/5b07b222b3aef7443d1b31459b4d40d4 to your computer and use it in GitHub Desktop.
Dagster - example query for dry-running a sensor
Note that:
- repositoryName = name of the Repository (if none, use "__repository__")
- repositoryLocationName = name of the Code Location
If the Code location name is something like "foo@bar" then this represents {repository}@{location}
i.e. the repository name is "foo" and location name is "bar".
mutation SensorDryRun {
sensorDryRun(
selectorData: {
repositoryName: "",
repositoryLocationName: "",
sensorName: ""
},
cursor: ""
) {
__typename
... on DryRunInstigationTick {
timestamp
evaluationResult {
runRequests {
runKey
tags {
key
value
}
runConfigYaml
assetSelection {
path
}
jobName
}
}
}
... on PythonError {
message
stack
}
... on SensorNotFoundError {
message
}
}
}
mutation SensorDryRun {
sensorDryRun(
selectorData: {
repositoryName: "__repository__",
repositoryLocationName: "data-eng-pipeline",
sensorName: "orders_sensor"
},
cursor:"14739577588"
) {
__typename
... on DryRunInstigationTick {
timestamp
evaluationResult {
runRequests {
runKey
tags {
key
value
}
runConfigYaml
assetSelection {
path
}
jobName
}
}
}
... on PythonError {
message
stack
}
... on SensorNotFoundError {
message
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment