Hey,

you could either use the same csv file and filter it each time with

LOAD CSV WITH HEADERS FROM "" AS row
WITH row
WHERE row.rel = "Rel1" // etc

Or you can use the import tool which can use the column content as rel-type
http://neo4j.com/docs/stable/import-tool.html

Or you can use my shell-import-tools
https://github.com/jexp/neo4j-shell-tools#cypher-import

Which allow you to replace parts of the query #{column} literally.

label1   rel      label2
Node1   Rel1   Node2
Node1   Rel2   Node3
Node1   Rel3   Node4

import-cypher -i file.csv CREATE (n:#{label1})-[:#{rel}]->(m:#{label2});

Cheers, Michael


On Fri, Feb 19, 2016 at 9:16 PM, John O'Gorman <[email protected]> wrote:

> Hi all;
>
> I have a data set where I have created all of the nodes I want, but they
> have different relationships.  I want to load the relationships from a CSV
> files that looks something like this:
>
> Node1   Rel1   Node2
> Node1   Rel2   Node3
> Node1   Rel3   Node4
>
> I could split my data to load all of the Rel1 types, then all of the Rel2
> types, then all of  the Rel3 types, using the: (n) - [:Relx] -> (m)
> syntax but I am hoping someone out there can help simplify this for me.
>
> Thanks.
>
> John O'
>
> --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to