Sbrisny
02/23/2024, 5:39 PMScout
02/23/2024, 5:39 PMrun_status_sensors
. This allows you to run one job after another based on the success or failure of the first job. Here's an example from the documentation on how to use a run_status_sensor
to run job_2
whenever job_1
has run and succeeded: python from dagster import run_status_sensor, DagsterRunStatus, RunRequest @run_status_sensor( run_status=DagsterRunStatus.SUCCESS, monitored_jobs=[job_1], request_job=job_2, ) def run_job_2_sensor(context): return RunRequest(run_key=None, run_config={})
This kind of dependency is an ordering dependency, ensuring that job_2
will be run every time job_1
succeeds. However, it does not allow for passing data from job_1
to `job_2`; it only controls the execution order.