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

Szymon Zaborowski

02/24/2023, 9:09 AM
Is it possible to have graph or set of assets/ops with conditional steps? For example let's say we have ops called
Copy code
['first', 'A', 'B', 'C', 'last']
and with certain conditions (from configuration for example) the final job could look like this:
Copy code
first -> A -> B -> C -> last
or this
Copy code
first -> A -> C -> last
of course each of the ABC ops/assets would return the same data type
v

Vinnie

02/24/2023, 9:11 AM
I’m not sure if you can have conditional steps, but you can have conditional branching in graphs, as per https://docs.dagster.io/concepts/ops-jobs-graphs/graphs#graph-patterns
s

Szymon Zaborowski

02/24/2023, 9:17 AM
unfortunately this wouldn't work in my case, I was wondering if utilizing more complex OPfactory could solve it https://docs.dagster.io/concepts/ops-jobs-graphs/ops#op-factory If conditional steps are not possible I will try the factory method - if that will work I'll make sure to share it here
c

claire

02/24/2023, 8:04 PM
Hi Szymon. Unfortunately not, for assets and ops you can't change the dependency tree via config at runtime. I'd recommend using the op factory approach you linked.
2 Views