Hi,
What I would do is build a map in memory for each node
e.g.
This:
id Amt Date PCName CName PDName DName
1 100 2013-10-09 A B C D
Would become:
[ {node_id : 1, name: "A", type: "PCName"}, {node_id : 2, name: "B",
type: "CName"}, {node_id : 3, name: "C", type: "PDName"}, {node_id :
4, name: "D", type: "DName"}]
Then before you write that to a nodes csv file you can sort it by the
node_id so everything is in order:
name type
A PCName
B CName
C PDName
D DName
You can then use those node ids to create an array of relationships
e.g.
[{ from: 1, to: 2}, { from: 3, to: 4}, { from: 2, to: 4, amt: 100,
date: "2013-10-09"}]
Then when you write that to a relationships csv file you'd end up with this:
from to amt date
1 2
3 4
2 4 100 2013-10-09
Hope that helps.