Hello Everyone! Has anyone tried to manually creat...
# questions
t
Hello Everyone! Has anyone tried to manually create pipeline(Not auto-register pipeline of kedro)?
a
Hey Trong, you can indeed manually add pipelines to the registry: https://docs.kedro.org/en/stable/nodes_and_pipelines/pipeline_registry.html If you can elaborate on your use case, maybe I can give specific examples?
t
I mean: I currently have n nodes, and these nodes are not related to each other in terms of input and output, so when creating a pipeline, they cannot be combined into a complete flow. I want to find a way to configure the execution order of each node
Just like in Airflow, we can create our own pipeline.
a
Ah I see, so pipelines will always sort the nodes topologically based on the inputs and outputs. What you can do to enforce order is specify dummy inputs and outputs from nodes in the order that you want.
t
Could you explain more details
a
For example:
Copy code
def create_pipeline(**kwargs) -> Pipeline:
    return pipeline(
        [
            
            node(
                func=func1,
                inputs="input1",
                outputs="dummy_output",
                name="node1",
                
            ),
            node(
                func=func2,
                inputs="dummy_output",
                outputs="output2",
                name="node2",

            ),
    )
This will force Kedro to execute node2 after node1