Skip to content

How can I connect tasks in a workflow which do not produce / consume any data? How can I create task dependency? #1138

Answered by SandraGH5
SandraGH5 asked this question in Q&A
Discussion options

You must be logged in to vote

Option 1

    @task
    def t2():
        ...
    @task
    def t3():
        ...
    @workflow
    def empty_wf():
        t2_node = create_node(t2)
        t3_node = create_node(t3)
        t3_node.runs_before(t2_node)

Option 2:

    @workflow
    def empty_wf2():
        t2_node = create_node(t2)
        t3_node = create_node(t3)
        t3_node >> t2_node

(This thread has been referenced from Slack)
@wild-endeavor
@kumare3

Replies: 1 comment

Comment options

SandraGH5
Jun 14, 2021
Collaborator Author

You must be logged in to vote
0 replies
Answer selected by SandraGH5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
flytekit FlyteKit Python related issue
1 participant