https://kedro.org/ logo
#beginners-need-help
Title
# beginners-need-help
a

antony.milne

07/01/2022, 9:26 PM
This is indeed a bit of an anti-pattern, although other people have done similarly. The best way to do it would be using an
after_context_created
hook like this: https://github.com/kedro-org/kedro/discussions/1436#discussioncomment-2789761 If it suits your use case, better would be to register two pipelines in `pipeline_registry.py`:
Copy code
pipeline_1 = pipeline(...)
pipeline_2 = pipeline_1 + [node_a]
and then run the pipeline you want through
kedro run -p
Another alternative is to keep the node in the pipeline but just change the logic inside the node function itself to skip using something like on
if not do_step_a: return