Using more than 1 row to create nodes in LOAD CSV

LOAD CSV reads row by row and one can do any kind of operation on that row. Is it possible to use more than one row at a time, for example, say I want to assign a relationship where every i'th row is a friend of (i-1)'th row? Or is it possible to store values of previous rows in some local variables while the LOAD CSV is running?

I don't know if it's possible, but in any case it might be easier to just add the data you need in your original CSV file (if you can edit it).
I had to do something like that, where each row had a relation to the previous row, and just added one column in the CSV file to do the job.

1 Like