Writing your first kedro Nodes
https://youtu.be/-gEwU-MrPuA
Before we jump in with anything crazy, let’s make some nodes with some vanilla
data structures.
import node # [1]
You will need to import node from kedro.pipeline to start creating nodes.
from kedro.pipeline import node
func # [2]
The func is a callable that will take the inputs and create the outputs.
inputs / outputs # [3]
Inputs and outputs can be None, a single catalog entry as a string, mutiple
catalog entries as a List of strings, or a dictionary of strings where the key
is the keyword argument of the func and the value is the catalog entry to use
for that keyword.
our first node # [4]
Sometimes in our pipelines our data is coming from an api where we already have
python functions built to pull with. Thats ok, kedro supposrts that with
inputs=None.
def create_range():
return range(100)
make_range = node(
func=create_range,
inputs=None,
outputs='range'
)
second node # [5]
Now we have some data to work from, lets use that as our inpu...