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

Shriram Holla

05/24/2022, 4:32 PM
Hi, I was wondering if there’s a way to execute ops that do not depend on each other sequentially? For example
Copy code
@job
def myJob():
    op1()
    op2()
op2 should run only after op1
🤖 1
s

sean

05/24/2022, 4:35 PM
Hi Shriram, our current solution to this is to use Nothing Dependencies. It specifies
op1
as a dep of
op2
but no data is passed between them.
q

Qwame

05/24/2022, 4:36 PM
You can use the
start_after
argument:
Copy code
@job
def myjob():
    op1(start_after=op2())
s

sean

05/24/2022, 4:45 PM
@Qwame while some of our integrations (e.g. dbt) provide a
start_after
keyword arg, this is not a dagster core API so you can’t use it for arbitrary ops.
Nothing
is the general API to use.
q

Qwame

05/24/2022, 4:47 PM
@sean thanks for the note. I used that in my dbt dag and thought it was a core API keyword.
s

Stephen Bailey

05/24/2022, 5:13 PM
s

Shriram Holla

05/24/2022, 7:26 PM
@sean Thanks for the response. I tried using a Nothing Dependency but encountered this error
Copy code
UserWarning: Error loading repository location dagster_join.py:dagster.core.errors.DagsterInvalidDefinitionError: In @job myJob, received invalid type <class 'NoneType'> for input "start" (passed by keyword) in op invocation "op2". Must pass the output from previous node invocations or inputs to the composition function as inputs when invoking nodes during composition.
s

sean

05/24/2022, 7:55 PM
Hmm would you mind sharing some code
s

Shriram Holla

05/24/2022, 8:05 PM
I was using another decorator in the ops and the order in which i specified them seemed to mess it up
s

sean

05/24/2022, 9:14 PM
Ah so the problem is resolved now?
s

Shriram Holla

05/25/2022, 1:15 PM
yes!