https://dagster.io/ logo
Title
j

Josh Lloyd

03/02/2023, 9:55 PM
I want to trigger a job after set of other jobs finish each day. Specifically, I have a particular job that kicks off 60+ other jobs through a sensor (they are all iterations of the exact same job). When those 60+ jobs are done each day, I would like to kickoff yet another job. Would I do this through a sensor? Recommended approach to identifying the trigger conditions?
s

sandy

03/02/2023, 11:20 PM
Hi Josh - a sensor would probably be the best way to do this. The isn't exactly what you're looking for, but the run status sensor might be a good place to start: https://docs.dagster.io/concepts/partitions-schedules-sensors/sensors#run-status-sensors
j

Josh Lloyd

03/02/2023, 11:44 PM
as I suspected. thanks!
do you know if there’s a way to get at the list of
run_id
produced from a successful sensor tick?
I can see in the dagster database that a sensor tick
tick_body
has the list of runs it kicks off, but I just don’t know if there’s a way to programmatically get at that
tick_body
@sandy
s

sandy

03/03/2023, 12:56 AM
could you perhaps put a tag on all the runs that get produced by a single tick and then query for runs with that tag?
j

Josh Lloyd

03/03/2023, 1:04 AM
I suppose I could try that, but each time I set off the batch of 60+ runs I’d have to have unique identifier to tag it with that I can then pass to this sensor tick evaluation and it’s not immediately apparent how I would do that pass to the sensor.
actually, I think you gave me an idea that’ll work. Because the original sensor is looking for a set of asset materializations, I look for any runs of the target job since the last batch of asset materializations and make sure all those runs are complete before I trigger this new sensor.