What would be the best way to have a job trigger a...
# ask-community
a
What would be the best way to have a job trigger another job? For instance, I want to collect a series of changes (job), then I want to have another job propagate those changes according to the type of changes
šŸ¤– 1
j
Hey @Aaron T is there a reason you could have both ā€œjobsā€ in the same job? ie have an op(s) collect the changes and then an op(s) propagate those changes all within one job?
a
@jamie I want to have multiple dynamic outputs downstream. Basically, get all items that need to be changed, then make those changes in batches
j
ok that makes sense. I would recommend using a sensor then. maybe in the first job you can write all of the changes to a bucket. then a sensor can look for new files in the bucket and kick off a job to process the changes
a
That's an interesting idea. I will take a look at it. Thanks!
@jamie is it possible to have a webhook sensor?
In the past I've used the graphql client to trigger jobs, I could do the same here, but not sure if that is very "dagster"-esq
j
by nature, sensors are polling - they run every 30 seconds (configurable) and check for changes vs being told about changes. i donā€™t think thereā€™s anything wrong with using the graphql client to launch a job though if that works with your architecture/setup better
šŸŒˆ 1
a
@jamie what if instead of a job I make an asset, could I use and asset observation to trigger a job?
j
i donā€™t believe asset observations can trigger jobs, theyā€™re just to record metadata about an existing asset