Hi, I was wondering if there’s a way to execute op...
# ask-community
s
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
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
You can use the
start_after
argument:
Copy code
@job
def myjob():
    op1(start_after=op2())
s
@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
@sean thanks for the note. I used that in my dbt dag and thought it was a core API keyword.
s
s
@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
Hmm would you mind sharing some code
s
I was using another decorator in the ops and the order in which i specified them seemed to mess it up
s
Ah so the problem is resolved now?
s
yes!