Tara Larrue
02/12/2024, 2:33 PMScout
02/12/2024, 2:33 PMlast_tick_completion_time
attribute available in the SensorEvaluationContext
. This attribute represents the last time that the sensor completed an evaluation, and it is provided as a float representing a UTC timestamp. Here is an example of how you might access this attribute within a sensor definition: python from dagster import sensor, SensorEvaluationContext @sensor def the_sensor(context: SensorEvaluationContext): last_run_time = context.last_tick_completion_time # You can use last_run_time here to inform your sensor's logic ...
The last_tick_completion_time
is one of the properties you can use to understand when the sensor was last evaluated. Keep in mind that this timestamp is in UTC, so you may need to convert it to your local timezone if necessary.