A sensor is a function Dagster evaluates on a short interval (30 seconds by default) to decide whether to launch runs. Use one when the trigger is an event rather than a time: a file landing, a row appearing, an API reporting a new export.
@dg.sensor(job=load_job) targets a job. The function receives a dg.SensorEvaluationContext and returns dg.RunRequest objects (a list is fine), or a dg.SkipReason saying why there is nothing to do.
Give each request a run key that identifies the event, such as the file name. A sensor sees the same files on every tick; Dagster launches a given run key only once per sensor and records later duplicates as skipped. Without run keys, every tick would load every file again.
Sensors start stopped unless default_status=dg.DefaultSensorStatus.RUNNING. Here, Evaluate tick runs one evaluation; the tick list shows each result.
One run per file in the landing zone, keyed by the file name.