Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Write Your First Pipeline Node
used in video
Full Post 👉
from kedro.pipeline import node
def create_range():
return range(100)
make_range = node(func=create_range, inputs=None, outputs="range")
def square(range):
return [i ** 2 for i in range]
square_range = node(func=square, inputs="range", outputs="range_squared")
def concat(range, range_two):
return [*range, *range_two]
# concat_ranges = node(func=concat, inputs=["range", "range_squared"], outputs="concat")
concat_ranges = node(
inputs={"range": "range", "range_two": "range_squared"},
if __name__ == "__main__":
from kedro.pipeline import Pipeline
from kedro.runner import SequentialRunner
from import DataCatalog
pipeline = Pipeline([make_range, square_range, concat_ranges])
runner = SequentialRunner()
result =, DataCatalog())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment