Is it possible to have graph or set of assets/ops ...
# ask-community
s
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
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
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
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.