https://dagster.io/ logo
#ask-community
Title
# ask-community
c

clay

07/10/2023, 2:21 PM
Is there a way to have a sensor start a job when it detects that another job has completed instead of keying it off if the final asset to be materialized in the other job?
t

Tim Castillo

07/10/2023, 2:24 PM
Would a run status sensor fit the bill for your needs?
c

clay

07/10/2023, 2:25 PM
I think so; I'll look into it. Thanks!
FYI, it's kind of clunky, so I'll probably skip it. The way the asset sensors work is great b/c you just use the key for the asset and the sensor declaration is very simple. In a perfect world, a Job Sensor would just key off of the Job Name the same way that an Asset Sensor keys off of an Asset name.
t

Tim Castillo

07/10/2023, 2:37 PM
Valid feedback. It's a fairly dense abstraction made before the asset model matured and most people were using ops. Can I ask why you wanted something besides asset sensors?
c

clay

07/10/2023, 2:40 PM
I have a code location with 37 related jobs that all have to be executed around the same time. Some have heavier requirements than others and the Snowflake warehouse has a 3600 second queue limit; queries that sit more than that long are cancelled (I'm trying to get that changed). So, one way to prevent the excessive queueing is to sequence the execution of the jobs, which I currently do with Asset Sensors. However, most of the jobs have many steps in them and the asset names are long. It takes a long time to go through and find the proper asset to key off of for this, when what I really want to do is to just have one job key off of another job.
Anyhow, if the jobs themselves change and the asset names change, I'll have to dig through at the asset level to fix it all instead of the job-level metadata being used to drive the subsequent jobs.
BTW, thanks, Tim! I always appreciate the support that you and your team provide on this Slack channel. D
4 Views