I want to migrate a project from a SQL graph database 'emulation' to neo4j, and now I'm stuck. I have a table with 100000+ rows of the form source_id, relationship_type, target_id. Here's the import statement:
LOAD CSV WITH HEADERS FROM
'file:///usr/local/n4jinput/special_semrelations.csv' AS line
WITH line
MATCH (s:SemObject {sem_id: TOINT(line.ool_source_id)})
MATCH (t:SemObject {sem_id: TOINT(line.ool_target_id)})
CREATE (s)-[line.rlt_relation]->(t)
The problem is in the create statement. What is the correct syntax to retrieve [:WHATEVER_IS_IN_THE_CSV]? Since I have a few dozen relationship types, I need to use some kind of variable here... If this is not possible in CYPHER, are there any other ways to do this in an efficient manner?