Hi, I am very new to Dagster. 1. Can we connect mu...
# ask-community
Hi, I am very new to Dagster. 1. Can we connect multiple jobs in Dagster, like feeding output of one job to another job as input and kick off the other job? 2. Can we take user input in a dagster job?
for question 2, where/how do you expect to provide user input? you can provide config values to a job before launching the job, for example in the launchpad in the UI.
Hello, 1- many ways I guess to do that. If they are linked, you can simply compose them if your graph dependencies are the same (e.g. all deps for your python can be installed). You can also use sensors https://docs.dagster.io/concepts/partitions-schedules-sensors/sensors RunRequest use the API. Finally you can use directly the API but I would prefer using directly the above.
👍 1
thank you box 1
to expand on what thomas said - In general if you have a data dependency between two jobs (ie job 1 computes some value and then job 2 consumes the value to do some other work) we recommend that you model that as a single job (you can use graphs to group sections of work if you need to reuse them in other places). so in the example i mentioned, you would have a single job that would produce and consume the value. If you have no data dependency, but you want to ensure that a job always runs after another job finishes (maybe you have a job that fetches a bunch of data and stores it in a db, and another job that updates a dashboard based on that data) you can use a run status sensor to watch for the completion of the first job, and then kick off the second job in response. A third option would be to use software defined assets if they fit your use case. Going back to the example where one job produces a value and another job consumes it, if we model this as SDAs then we have one asset that produces a value and a downstream asset that consumes it. You can use an asset sensor to watch for when the first asset materializes, then you can run a job that will materialize the downstream asset in response. the job materializing the downstream asset will automatically use the latest value of the upstream asset without you needing to pass the value along let me know if i can offer more explanation of any of these concepts!
👍 1