I have a documentation question about `SensorResul...
# dagster-feedback
b
I have a documentation question about
SensorResult
and
RunRequest
RunRequest https://github.com/dagster-io/dagster/blob/master/python_modules/dagster/dagster/_core/definitions/run_request.py#L110:L111 Says RunRequest to be returned from
@sensor
it would be nice if what the
partition_key
argument does in https://github.com/dagster-io/dagster/blob/master/python_modules/dagster/dagster/_core/definitions/run_request.py#L130 • SensorResult https://github.com/dagster-io/dagster/blob/master/python_modules/dagster/dagster/_core/definitions/run_request.py#L358:L370 also talks about it as return from sensor evaluation, and it has dynamic partition awareness Yet there are no examples of SensorResult and searching docs on https://docs.dagster.io/ gives only the Python Doc of API Appreciate if some clarification of its purpose and differences is provided? When to use
SensorResult
vs when to use
RunRequest
t
Hey! Apologies for this.
SensorResult
is something that came out with 1.4 and haven't caught up on the documentation for it yet.
SensorResult
s are a simplified wrapper to put all of your sensor-related side effects into one place. It combines everything that's made from a sensor: run requests, cursor updates, and skip reasons. So rather than `yield`ing your
RunRequests
with each new one, and updating your cursor somewhere else, you also have the option to return one
SensorResult
at the end. afaik, it's mainly a convenience class and you can skip using it if you don't want it. but I'll let someone from the team correct me if I'm wrong.
b
Thanks @Tim Castillo for the explanation, additionally how does
partition_key
behave in the
RunRequest
?