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

Aaron T

07/03/2023, 4:42 PM
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

jamie

07/03/2023, 4:50 PM
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

Aaron T

07/03/2023, 5:00 PM
@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

jamie

07/03/2023, 5:09 PM
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

Aaron T

07/03/2023, 5:11 PM
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

jamie

07/03/2023, 5:38 PM
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

Aaron T

07/03/2023, 6:50 PM
@jamie what if instead of a job I make an asset, could I use and asset observation to trigger a job?
j

jamie

07/03/2023, 6:52 PM
i don’t believe asset observations can trigger jobs, they’re just to record metadata about an existing asset
10 Views