Handling Large Dataset

Continuing the discussion from How to handle large data sets?:

Can someone show me the exact node to do that in the sub?

I’ve seen in this thread How to handle large data/files in n8n?

  • ,edit: added a set node to clear data by keeping only set. Otherwise it will return the data and you will still have to deal with all the data processed in the main node.

and the end

  • To answer your question. You simply put this in the code node:
return [{json:{}}]

So I don’t know if I should put a set node (and what should I put in it) or a code node…

If someone can show me the exact node to put at the end of the sub-wf, would be very useful :wink:

Both are valid options.
Not sure what is not clear about it?

code node ok.

But the set node, I don’t understand. Can you show please an example ?