Hello! Thanks for your patience and help. It's end of the day Friday, and I'm just tired, so I'm going to ask for help. I'm trying to import a relatively straightforward thesaurus into a graph. I've organized the information into two CSVs (pipe delimited), one for the nodes and one for the relationships.
nodes.csv has a structure like this:
:ID | concept:string
1 | foo
2 | bar
3 | spam
4 | ham
relationships.csv has this structure like this:
:START_ID | :TYPE | :END_ID
1 | is_not | 2
1 | is_not |3
3 | is_like | 4
Now, when I try to import this, I'm using these queries:
CREATE CONSTRAINT ON (concept:Concept) ASSERT concept.id IS UNIQUE
CREATE INDEX ON :Concept(name)
LOAD CSV WITH HEADERS FROM "file:///nodes.csv" AS csvLine fieldterminator '|'
CREATE (c:Concept {id: toInteger(csvLine.id), name:csvLine.name})
USING PERIODIC COMMIT 500
LOAD CSV WITH HEADERS FROM "file:///relationships.csv" AS csvLine FIELDTERMINATOR "|"
MATCH (concept:Concept {id: toInteger(csvLine.conceptID)}),(concept:Concept {id:toInteger(csvLine.conceptID)})
CREATE (concept)-[:RELATIONSHIP {type: csvLine.type}]->(concept)
I end up with a lot of blank nodes, and no relationships. What am I doing wrong?