https://kedro.org/ logo
#questions
Title
# questions
g

Giulio Morina

12/12/2023, 3:02 PM
Hello! I have a node that outputs a dataframe and I'd like to save that same dataframe on 2 different locations. Is there a quicker way than having a node saving the df on one of the locations and then another node that just does
lambda x:x
to save in the different location? E.g. by specifying multiple paths in the catalog? Thanks 🙂
j

Juan Luis

12/12/2023, 3:21 PM
funny, I was about to say "you can declare 2 outputs" but that's not going to work unless you do
Copy code
return df, df
in the node 😅
if you go down that path though, it would be something like
Copy code
return pipeline([
  ...
  node(
    ...
    outputs=["ds1", "ds2"]
  ),
])
(pseudocode, didn't test it but it should work)
g

Giulio Morina

12/12/2023, 3:21 PM
Yeah I was hoping to not change the original node 🙂
But agree this will def work 😄
j

Juan Luis

12/12/2023, 3:22 PM
will let others comment but I don't think this is possible in Kedro without having a dummy node or modify the node
👍 1
2 Views