Harpal
08/23/2022, 6:17 PM# This is the job to run first
@job(...)
def run_first():
dbt_seed_op()
# This is the job to run second
run_second = AssetGroup(...).build_job("run_second")
When I try the following pattern I get an error:
@job
def combined_job():
run_second(run_first())
>>>
dagster.core.errors.DagsterInvariantViolationError: Attempted to call job 'combined_job' directly. Jobs should be invoked by using an execution API function (e.g. `job.execute_in_process`).
I could not find an example of the job.execute_in_process
method in the docs.
Does anyone know how to get around this?chris
08/23/2022, 8:15 PMrun_first
and run_second
be graphs, and then orchestrate them within the same graph?
@graph
def run_first():
dbt_seed_op()
@graph
def run_second():
...
@job
def combined_job():
run_second(run_first())
If you need run_first
and run_second
to be different jobs for whatever reason, then you can set up run_second
to be triggered by run_first
by a sensor.chris
08/23/2022, 8:16 PM